LOTUSSCRIPT/COM/OLE CLASSES


Examples: GetCurrent method
This Visual Basic code (GetCurrent_Click Sub) gets the current entry.

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")
Set n = v.CreateViewNav
End Sub

See Also