例: MarkAllUnread method (NotesViewNavigator - LotusScript®)

このエージェントは、ビューのすべての既読文書の総数を取得し、既読文書のすべてに未読のマークを付け、次にビューの既読文書の新しい数をカウントします。

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