formatDocument (NotesNewsletter - JavaScript™)
Creates a document containing a rendering of a document in the newsletter collection. This is similar to forwarding a document, which displays a rendering of the forwarded document.
Defined in
NotesNewsletterSyntax
formatDocument(db:NotesDatabase,
index:int) : NotesDocument
Parameter | Description |
---|---|
Database db |
The database in which to create the newsletter document. If you specify this parameter as null, the document is created in the user's default mail database. |
int index |
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 | Description |
---|---|
Document |
A document in db, 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 of Document.If you want to mail the rendered document, you must explicitly call the send method of Document.
The target database must have a default view or the following occurs: "Notes® error: Special database object cannot be located."