次の例は、現在のデータベース内で現在のユーザーが所有する個人ビューのリストを返します。
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim resultList As String
Dim views As Variant
resultList = ""
Set db = session.CurrentDatabase
views = db.Views
Forall view In views
If view.IsPrivate Then
If resultList = "" Then
resultList = view.Name
Else
resultList = resultList + ", " + view.Name
End If
End If
End Forall
If resultList = "" Then
resultList = "None"
End If
Messagebox resultList,, "The private view(s) are:"
End Sub