Examples: UpdateAll method (NotesViewEntryCollection - LotusScript®)

This script displays the subject of each document corresponding to an entry in a view entry collection and then marks all of the documents as processed by the agent.

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim view As NotesView
  Dim entry As NotesViewEntry
  Dim vc As NotesViewEntryCollection
  Dim doc As NotesDocument
  Set db = session.CurrentDatabase
  Set view = db.GetView("By Category")
  view.AutoUpdate = False
  Set vc = view.AllEntries
  Set entry = vc.GetFirstEntry()
  While Not (entry Is Nothing)
    Set doc = entry.Document
    Messagebox doc.Subject(0)
    Set entry = vc.GetNextEntry(entry)
  Call vc.UpdateAll
End Sub