Creates a new rich-text item in a document.
Parameter |
Description |
name |
The name of the new rich-text item. |
Examples
This button creates a new document
in the current database with a rich text item containing text and
an attachment.
try {
var doc:NotesDocument = database.createDocument();
doc.appendItemValue("Form", "main");
var image:string = requestScope.query;
doc.appendItemValue("Subject", image);
var rtitem:NotesRichTextItem = doc.createRichTextItem("Body");
rtitem.appendText("Attached is " + image + ".");
rtitem.addNewLine();
rtitem.embedObject(NotesEmbeddedObject.EMBED_ATTACHMENT, "", image, null);
doc.save();
requestScope.status = "Created document for image " + image;
} catch(e) {
requestScope.status = "Could not create document for image " + image;
}