次の Visual Basic コード (GetCurrent_Click Sub) は、現在のエントリを取得します。
Dim s As New NotesSession
Dim db As NotesDatabase
Dim v As NotesView
Dim n As NotesViewNavigator
Private Sub GetCurrent_Click()
On Error GoTo errorHandler
Set e = n.GetCurrent
If e.IsCategory Then
MsgBox e.ColumnValues(0), , "Category"
ElseIf e.IsTotal Then
MsgBox "Is a total", , "Total"
ElseIf e.IsDocument Then
MsgBox e.Document.GetItemValue("Subject")(0), , "Document"
End If
Exit Sub
errorHandler:
MsgBox "Nothing in view or folder", , "No entries"
End Sub
Private Sub InitializeNav_Click()
Set s = New NotesSession
s.Initialize
Set db = s.GetDatabase("", "Web test")
Set v = db.GetView("Main View")
v.AutoUpdate = False
Set n = v.CreateViewNav
End Sub