例: CopyItemToDocument method

次のスクリプトは文書の Body アイテムと BriefDescription アイテムを現在のデータベースの新規のメールメモにコピーします。Body アイテムの名前は変更しません。BriefDescription アイテムの名前は Subject に変更します。

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim memo As NotesDocument
Dim itemA As NotesItem
Dim itemB As NotesItem
Set db = session.CurrentDatabase
'...set value of doc...
Set itemA = doc.GetFirstItem( "Body" )
Set itemB = doc.GetFirstItem( "BriefDescription" )
Set memo = New NotesDocument( db )
Call itemA.CopyItemToDocument( memo, "Body" )
Call itemB.CopyItemToDocument( memo, "Subject" )
Call memo.Send( False, "Cynthia Brainey" )