例: GetNextDocument method (NotesDocumentCollection - LotusScript®)

次のスクリプトはコレクションの 2 番目の文書の作成者を表示します。

Sub Click(Source As Button)
  Dim s As New NotesSession
  Dim db As NotesDatabase
  Dim dc As NotesDocumentCollection
  Dim docA As NotesDocument
  Dim docB As NotesDocument
  
  Set db = s.CurrentDatabase
  Set dc = db.FTSearch("Business",10)
  Set docA = dc.GetFirstDocument
  Set docB = dc.GetNextDocument(docA)
  Forall a In docB.Authors
    Messagebox( a )
  End Forall
End Sub