次のスクリプトは文書 A の図形を作成し、新規に作成した文書 B の Body アイテムに配置します。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 )