Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim mailmsgdoc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Dim DummyObject As NotesEmbeddedObject
Set db = session.CurrentDatabase
Set mailmsgdoc=New notesdocument(db)
mailmsgdoc.form="Memo"
mailmsgdoc.subject= "Test Mailversand mit Attachment"
mailmsgdoc.sendto="ukrause"
mailmsgdoc.copyto= ""
Set rtitem=New notesrichtextitem(mailmsgdoc,"Body")
Call rtitem.appendtext ( "Hallo Uli" )
Call rtitem.addnewline (1)
filename$ = "test.doc"
FilePath$ = "c:\temp\" + filename$
Set DummyObject = rtitem.EmbedObject( EMBED_ATTACHMENT,"" , FilePath$)
Call rtitem.addnewline (2)
Call rtitem.addnewline (1)
Call rtitem.appendtext("Customer Services Dept.")
Call rtitem.addnewline (1)
Call mailmsgdoc.send(False)
End Sub