Hei Strunzenolwin,
versuche es einfach mal mit :
Dim sMessage As String
statt
Dim sMessage As Object
...denn was du übergibst, ist lediglich ein String (Text) - kein Objekt.
Wenn Du es explizit deklarierst, gibt es auch einen Fehler. Der Shell.execute() Befehl erwartet im
Übrigen einen String, kein Objekt;)
viele Grüße
Thomas
Am 03.12.2020 um 17:12 schrieb Gerch Strunzenolwin:
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
--
Liste abmelden mit E-Mail an: users+unsubscribe@de.libreoffice.org
Probleme? https://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: https://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: https://listarchives.libreoffice.org/de/users/
Datenschutzerklärung: https://www.documentfoundation.org/privacy
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.