Examples: CreateViewNavMaxLevel method

This Visual Basic code creates a navigator that contains only the top-level entries of a view.

Private Sub ViewMaxLevel_Click()
Dim s As New NotesSession
s.Initialize
Dim dir As NotesDbDirectory
Dim db As NotesDatabase
Dim v As NotesView
Dim nav As NotesViewNavigator
Dim e As NotesViewEntry
Set dir = s.GetDbDirectory("")
Set db = dir.OpenDatabase("Web test")
Set v = db.GetView("Main View")
Set nav = v.CreateViewNavMaxLevel(0)
Set e = nav.GetFirst
MsgBox e.UniversalID, , "UNID of first entry"
End Sub