von crush » Do, 30.05.2013 11:45
So, habe
das hier mal durchgeführt und hat auf Anhieb geklappt.
Wenn ich nun das Makro laufen lasse (mit Kontrollfeld -> Allgemein -> Aktion: Dok./Website öfffen und der entsprechenden URL, offnet sich auch das Mailfenster mit der korrekten Mail und dem Betreff. Aber der Text hinter "Body=" fehlt. Oder ist das nicht der Nachrichtentext?
Code: Alles auswählen
mailto:hinz@kunz.de?subject=Test&Body=Hallo,%20das%20ist%20ein%20Test,MfG,Schlonz
Aber geht das auch, dass das Fenster gar nicht erst angezeigt wird, sondern gleich verschickt mit Text?
Und obwohl es mit der Aktion und der URL klappt, sagt das programmierte Makro immernoch, dass kein Standard-emailprogramm ausgewählt ist:
Code: Alles auswählen
REM ***** BASIC *****
' Example of how to send e-mail from Basic in OpenOffice.org.
Sub Main
' Your e-mail address goes here...
cEMailAddress = "hinz@kunz.de"
cSubject = "Test-mail"
' Use one of the following two lines, depending on which
' mailer you want to use.
' SimpleCommandMail will use your system's command line tools to send mail.
' SimpleSystemMail will use whatever (GUI) mail client you configured in
' Tools -> Options -> OpenOffice.org -> External Programs.
' For some reason the command line mail service does not appear to work on Windows?
'
' oMailer = createUnoService( "com.sun.star.system.SimpleCommandMail" )
oMailer = createUnoService( "com.sun.star.system.SimpleSystemMail" )
oMailClient = oMailer.querySimpleMailClient()
oMessage = oMailClient.createSimpleMailMessage()
oMessage.setRecipient( cEMailAddress )
oMessage.setSubject( cSubject )
'oMessage.setAttachment( .... )
' ...etc.
' The zero is the DEFAULTS constant from
' com.sun.star.system.SimpleMailClientFlags.
oMailClient.sendSimpleMailMessage( oMessage, 0 )
' One of the options in the SimpleMailClientFlags is an option
' to send the mail with no user interface. Just send it.
End Sub
So, habe [url=http://doc.zarafa.com/6.40/User_Manual/en-US/html/_advanced_zarafa_webaccess_configurations.html]das hier[/url] mal durchgeführt und hat auf Anhieb geklappt.
Wenn ich nun das Makro laufen lasse (mit Kontrollfeld -> Allgemein -> Aktion: Dok./Website öfffen und der entsprechenden URL, offnet sich auch das Mailfenster mit der korrekten Mail und dem Betreff. Aber der Text hinter "Body=" fehlt. Oder ist das nicht der Nachrichtentext?
[code]mailto:hinz@kunz.de?subject=Test&Body=Hallo,%20das%20ist%20ein%20Test,MfG,Schlonz[/code]
Aber geht das auch, dass das Fenster gar nicht erst angezeigt wird, sondern gleich verschickt mit Text?
Und obwohl es mit der Aktion und der URL klappt, sagt das programmierte Makro immernoch, dass kein Standard-emailprogramm ausgewählt ist:
[code]REM ***** BASIC *****
' Example of how to send e-mail from Basic in OpenOffice.org.
Sub Main
' Your e-mail address goes here...
cEMailAddress = "hinz@kunz.de"
cSubject = "Test-mail"
' Use one of the following two lines, depending on which
' mailer you want to use.
' SimpleCommandMail will use your system's command line tools to send mail.
' SimpleSystemMail will use whatever (GUI) mail client you configured in
' Tools -> Options -> OpenOffice.org -> External Programs.
' For some reason the command line mail service does not appear to work on Windows?
'
' oMailer = createUnoService( "com.sun.star.system.SimpleCommandMail" )
oMailer = createUnoService( "com.sun.star.system.SimpleSystemMail" )
oMailClient = oMailer.querySimpleMailClient()
oMessage = oMailClient.createSimpleMailMessage()
oMessage.setRecipient( cEMailAddress )
oMessage.setSubject( cSubject )
'oMessage.setAttachment( .... )
' ...etc.
' The zero is the DEFAULTS constant from
' com.sun.star.system.SimpleMailClientFlags.
oMailClient.sendSimpleMailMessage( oMessage, 0 )
' One of the options in the SimpleMailClientFlags is an option
' to send the mail with no user interface. Just send it.
End Sub [/code]