LOTUSSCRIPT/COM/OLE CLASSES
Examples: RenderToRTItem method
1. This script creates a picture of document A and places it into the Body item of the newly created document B.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim docA As NotesDocument
Dim docB As NotesDocument
Dim rtitem As NotesRichTextItem
Dim success As Variant
Set db = session.CurrentDatabase
Set collection = db.AllDocuments
Set docA = collection.GetFirstDocument
Set docB = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( docB, "Body" )
docB.Form = "Main Topic"
docB.Subject = "It's a picture of the document"
Call docB.Save( True, True )
success = docA.RenderToRTItem( rtitem )
Call docB.Save( True, True )
2. This script creates a picture of the current document and places it into the Body of the newly created document B.
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim docA As NotesDocument
Dim docB As NotesDocument
Dim rtitem As NotesRichTextItem
Dim success As Variant
Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument
Set docA = uidoc.Document
Set docB = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( docB, "Body" )
docB.Form = "Main Topic"
docB.Subject = "It's a picture of the document"
Call docB.Save( True, True )
success = docA.RenderToRTItem( rtitem )
Call docB.Save( True, True )
See Also
RenderToRTItem method
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary