Examples: GotoFirst and GotoNext methods

This Visual Basic code (GotoFirstNext_Click Sub) gets all the entries in a view from first to last.

Dim s As New NotesSession
Dim db As NotesDatabase
Dim v As NotesView
Dim n As NotesViewNavigator
Dim e As NotesViewEntry
Dim lastPosition As String
Private Sub GotoFirstNext_Click()
InitializeNav_Click
lastPosition = ""
Call n.GotoFirst
Set e = n.GetCurrent
While e.GetPosition(".") <> lastPosition
  If e.IsCategory Then
    MsgBox e.ColumnValues(0), , "Category"
  ElseIf e.IsDocument Then
    MsgBox e.Document.GetItemValue("Subject")(0), , "Document"
  End If
  lastPosition = e.GetPosition(".")
  Call n.GotoNext(e)
  Set e = n.GetCurrent
Wend
End Sub
Private Sub InitializeNav_Click()
Set s = New NotesSession
s.Initialize
Set db = s.GetDatabase("", "Web test")
Set v = db.GetView("By Category")
v.AutoUpdate = False
Set n = v.CreateViewNav
End Sub