次の例では、データベースのすべてのビューのプロパティを出力します。
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim views As Variant
Set db = session.CurrentDatabase
views = db.Views
REM view is a NotesView object
REM cannot be Dim'd - loop reference variable
Forall view In views
Messagebox "View name: " & view.Name & Chr(10) _
& "Parent: " & view.Parent.Title & Chr(10) _
& "Last modified: " & view.LastModified & Chr(10) _
& "Created: " & view.Created & Chr(10) _
& "Universal ID: " & view.UniversalID & Chr(10) _
& "BackgroundColor: " & _
view.BackgroundColor & Chr(10) _
& "Number of columns: " & view.ColumnCount & Chr(10) _
& "Top level entries: " & view.TopLevelEntryCount,, view.Name
If view.IsDefaultView Then _
Messagebox "Default view",, view.Name
If view.IsFolder Then Messagebox "Folder",, view.Name
If Not Isempty(view.Aliases) Then
Forall aliass In view.Aliases
Messagebox "Alias: " & aliass,, view.Name
End Forall
End If
End Forall
End Sub