GetLastDocument (NotesView - LotusScript®)

Returns the last document in a view. This is the same document you see when you scroll to the end of the view in the Notes® user interface.

Defined in

NotesView

Syntax

Set notesDocument = notesView .GetLastDocument

Return value

notesDocument

A NotesDocument. The last document in the view.

Usage

GetLastDocument is useful when:

  • The first column in the view is sorted by date, and you want to access either the oldest or newest document in the view.
  • You want to access every document in the view. Use GetPrevDocument to find documents before the last one.
  • You write a script that modifies items on multiple documents, but first you want to test the script against just one document. The last document in the view is often the easiest to locate visually.

Example