Hallo Bernd,
hast Du ein kleines Beispiel. So weit bin ich.
Public Sub SendNotesMail(Subject As String, Recipient As String, BodyText As String, SaveIt As Boolean)
'Variablen Dimensionieren, die benötigt werden, um das Mail zu senden
Dim Maildb As Object 'Die Datenbank
Dim UserName As String 'Der Benutzername
Dim MailDbName As String 'Der Datenbankname
Dim MailDoc As Object 'Das Maildokument selbst
Dim AttachME As Object 'Der Anhang (Richtext)
Dim Session As Object 'Die Notes Session
Dim EmbedObj As Object 'Ein eingebettetes Objekt (Anhang)
Set Session = CreateObject("Notes.NotesSession")
Set Maildb = Session.GETDATABASE("", MailDbName)
If Maildb.isOpen = True Then
'Fertig zum mailen!
Else
Maildb.OPENMAIL
End If
'Ein neues Maildokument erstellen
Set MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
MailDoc.sendto = Recipient
MailDoc.Subject = Subject
MailDoc.body = BodyText
MailDoc.SAVEMESSAGEONSEND = SaveIt
Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment1")
'Lotus öffnen
Dim Workspace As Object
Set Workspace = CreateObject("Notes.NotesUIWorkspace")
Call Workspace.EditDocument(True, MailDoc).GotoField("Body")
'Aufräumen
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj = Nothing
End Sub
Private Sub Command1_Click()
SendNotesMail Text1, Text3, Text4, Check1
End Sub
Danke im voraus