LOTUSSCRIPT/COM/OLE CLASSES


Examples: MarkAllUnread method
This agent gets a count of all read documents in a view, marks them all as unread, then counts the new number of read 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 read documents and get count
 Set nav = view.CreateViewNavFromAllRead()
 Messagebox nav.Count,, "Number of read entries"

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

End Sub