例: NotesDocumentCollection class

  1. 次のスクリプトは NotesDatabase の AllDocuments プロパティを使用して、データベースのすべての文書を表す NotesDocumentCollection オブジェクトを取得します。
    Dim db As New NotesDatabase( "Ankara", "project.nsf" )
    Dim collection As NotesDocumentCollection
    Set collection = db.AllDocuments
  2. 次のスクリプトは、NotesDatabase の Search メソッドを使用して、NotesDocumentCollection オブジェクトを取得します。NotesDocumentCollection オブジェクトは、1995 年 3 月 14 日以降に作成されて [Subject] に「lake」を含むすべての文書を表します。
    Dim db As New NotesDatabase( "Ankara", "project.nsf" )
    Dim dateTime As New NotesDateTime( DateNumber(1995, 3, 14) )
    Dim selection As String
    Dim collection As NotesDocumentCollection
    selection = |@Contains( Subject; "lake" )|
    Set collection = db.Search( selection, dateTime, 0 )