例: RenderToRTItem method

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