Examples: GetPrevDocument method (NotesView - LotusScript®)

This script gets the second-to-last document in the All by Status & Project view of a database.

Dim db As New NotesDatabase( "Constantinople", "todo.nsf" )
Dim view As NotesView
Dim lastDoc As NotesDocument
Dim secondToLastDoc As NotesDocument
Set view = db.GetView( "All by Status & Project" )
Set lastDoc = view.GetLastDocument
Set secondToLastDoc = view.GetPrevDocument( lastDoc )