LOTUSSCRIPT/COM/OLE CLASSES


Examples: MarkAllRead method
This agent gets a count of all unread documents in a view, marks them all as read, then counts the new number of unread documents in the view.

Sub Initialize
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim view As NotesView
 Dim nav As NotesViewNavigator
 Set db = session.CurrentDatabase
 Set view = db.GetView("By Category")

 REM Create navigator for unread documents and get count
 Set nav = view.CreateViewNavFromAllUnread()
 Messagebox nav.Count,, "Number of unread entries"

 REM Mark all documents read and count again
 Call nav.MarkAllRead()
 Set nav = view.CreateViewNavFromAllUnread()
 Messagebox nav.Count,, "Number of unread entries"

End Sub