次のフォームボタンの例では、文書を作成し、作成した文書に現在の文書の [Subject] と [本文] フィールドをコピーし、「Marketing」という名前のグループにその文書をメールします。文書は保存されません。
Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument, doc2 As NotesDocument
Dim item As NotesItem
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set db = session.CurrentDatabase
Set doc2 = New NotesDocument(db)
Set item = doc.GetFirstItem("Subject")
Call item.CopyItemToDocument(doc2, "Subject")
Set item = doc.GetFirstItem("Body")
Call item.CopyItemToDocument(doc2, "Body")
Call doc2.Send(True, "Marketing")
End Sub