例: GetView method

  1. 次のスクリプトは現在のデータベースの [Main] ビューを取得してタイトルを表示します。
       Sub Click(Source As Button)
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim view As NotesView
      Set db = session.CurrentDatabase
      Set view = db.GetView( "Main View" )
      If Not view Is Nothing Then Messagebox( view.Name )
    End Sub
  2. 次のスクリプトは現在のデータベースの [By Projects¥By Author] ビューを取得します。ただし、ビューへのアクセスには別名を使用します。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim view As NotesView
    Set db = session.CurrentDatabase
    Set view = db.GetView( "Authors" )