例: NotesViewEntryCollection class

  1. 次のスクリプトは、[By Category] ビューの「Baseball」カテゴリにあるビューエントリのコレクションを取得し、PutAllInFolder メソッドを使用して [Sports] フォルダに入れます。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim view As NotesView
    Dim vc As NotesViewEntryCollection
    Set db = session.CurrentDatabase
    Set view = db.GetView("By Category")
    view.AutoUpdate = False
    Set vc = view.GetAllEntriesByKey("Baseball")
    Call vc.PutAllInFolder("Sports")
  2. 次のスクリプトは、GetNthEntry メソッドを使用してビューエントリコレクションから 3 番目のエントリを取得します。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim view As NotesView
    Dim entry As NotesViewEntry
    Dim vc As NotesViewEntryCollection
    Set db = session.CurrentDatabase
    Set view = db.GetView("By Category")
    view.AutoUpdate = False
    Set vc = view.GetAllEntriesByKey("Books")
    Set entry = vc.GetNthEntry(3)