LOTUSSCRIPT/COM/OLE CLASSES


Examples: NotesRichTextItem class
1. This script creates a new rich text item called ProjectDescription and adds a text value to it.
2. This script achieves the same result as the one above, but also copies the newly created rich text item to a second document. Because NotesRichTextItem inherits from NotesItem, the rtitem object can use methods defined in both NotesRichTextItem (such as AppendText) and NotesItem (such as CopyItemToDocument).
3. This script creates a new NotesRichTextItem called "Body" on a mail memo. It uses the AppendDocLink method to place a doclink to the current document in the Body, and the Send method to mail the memo to Frank Glennel.
4. This script gets an existing rich text item called ProjectDescription and adds a carriage return and a text value to it. Notice how rtitem is declared a variant, since the GetFirstItem method returns a NotesItem that may or may not be a NotesRichTextItem. Since Type is a property defined in NotesItem, you can use it with a NotesRichTextItem as well. The script tests the variant to see if it is rich text; if so, it uses NotesRichTextItem methods on the variant. For more information, see the GetFirstItem method in NotesDocument.


See Also