renderToRTItem (NotesDocument - JavaScript™)
Creates a picture of a document and places it into a rich-text item that you specify.
Defined in
NotesDocumentSyntax
renderToRTItem(rtitem:NotesRichTextItem) : boolean
Parameter | Description |
---|---|
rtitem |
The destination for the picture. Cannot be null. |
Return value | Description |
---|---|
boolean |
If true, the method is successful. If false, the method is not successful and the rich text item remains unchanged. This can happen if an input validation formula fails on the document form. |
Usage
The picture is created using both the document and its form. Therefore, the input translation and validation formulas of the form are executed.If the target rich text item is in a new document, you must save the document before calling this method.
Examples
This button sends a memo containing a rendering of the current document.var doc:NotesDocument = currentDocument.getDocument();
var memo:NotesDocument = database.createDocument();
memo.appendItemValue("Form", "memo");
memo.appendItemValue("Subject", "Picture of " + doc.getItemValueString("subject"));
var body:NotesRichTextItem = memo.createRichTextItem("Body");
memo.save();
doc.renderToRTItem(body);
memo.send(session.getUserName());