Hallo,
ich will eine EMail erstellen per Makro.
Hier ist der Code:
Dim sPMUA As String
Dim sEmail As String
Dim sSubject As String
Dim sAttachment As String
Dim sBody As String
Dim sMessage As Object
Dim oShell As Object
oShell = createUnoService("com.sun.star.system.SystemShellExecute")
sPMUA = "/Applications/Thunderbird.app/Contents/MacOS/thunderbird"
sEmail = "strunzenolwin@gmx.de"
sSubject = "Ich bin ein Betreff"
sAttachment="file:///Users/strunz/Documents/Foto.jpeg"
sBody = "Hallo ich bin der Body"
sMessage = sPMUA & _
" -compose to=" & sEmail & _
",bcc=user@example.example" & _
",subject='" & sSubject & "'" & _
",attachment='"& sAttachment & "'" & _
",preselectid=id10" & _
",body='" & sBody & "'"
oShell.execute(sMessage)
End Sub
Allerdings erhalte ich folgende Aussage (Objektvariable nicht belegt
(sMessage = sPMUA &_)
Was muss ich tun?
Mfg
Strunzenolwin