FormatDocument (NotesNewsletter - LotusScript®)

Creates a new document in the given database, containing a rendering (picture) of a specified document in the newsletter's collection. This is similar to forwarding a document, which displays a picture of the forwarded document.

Defined in

NotesNewsletter

Syntax

Set notesDocument = notesNewsletter .FormatDocument( notesDatabase , n% )

Parameters

notesDatabase

The database in which to create the newsletter document. If you do not specify a notesDatabase, the document is created in the user's default mail database.

n%

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

Return value

notesDocument

A document in notesDatabase, containing a rendering of the nth document in the collection. The rendering is placed into the Body item.

Usage

If you want to save the rendered document, you must explicitly call the Save method on the NotesDocument. The document is saved to the notesDatabase you specify.

If you want to mail the rendered document, you must explicitly call the Send method on the NotesDocument.

The target database must have a default view or the following occurs: "Notes® error: Special database object cannot be located."

Example