GetNthDocument (NotesDocumentCollection - LotusScript®)

Given a position number, returns the document at that position in a collection.

Defined in

NotesDocumentCollection

Syntax

Set notesDocument = notesDocumentCollection .GetNthDocument( n& )

Parameters

n&

Long. A number indicating the document to return. Use 1 to indicate the first document in the collection, 2 to indicate the second document, and so on.

Return value

notesDocument

NotesDocument. The document in the specified position in the collection. If there is no document at the specified position, returns Nothing.

Usage

Using GetNthDocument to iterate through a loop is strongly discouraged for performance reasons. See GetDocument, GetFirstDocument, GetLastDocument, GetNextDocument, and GetPrevDocument for the preferred loop structure.

Example