Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Set db = session.CurrentDatabase
Set view = db.GetView( "By Category" )
Forall c In view.Columns
Messagebox( c.Position & " " & c.Title )
End Forall
End Sub
例えば、[By Category] ビューにタイトル付きの列が 2 つ、タイトルなしの列が 3 つある場合は、このスクリプトは次の 5 つの各値を表示するダイアログボックスを 5 回表示します。
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim column As NotesViewColumn
Set db = session.CurrentDatabase
Set view = db.GetView( "By Category" )
Set column = view.Columns( 2 )
End Sub
Sub Initialize
Dim db As New NotesDatabase( "", "yahoo.nsf" )
Dim view As NotesView
Dim column As NotesViewColumn
Set view = db.GetView( "By Author" )
Forall c In view.Columns
If c.IsSorted Then
Set column = c
Exit Forall
End If
End Forall
End Sub