Hello everybody,
I use the following piece of (basic-)code to send documents from LibreOffice-Base via E-Mail. The code used to work in LibreOffice 3.x but does not in LibreOffice 4.x (I've tested it on LibreOffice 4.2 and 4.3). The Problem is the document is not attached - though no error occurs. Its simply the attachment's gone missing.
As I'm not sure where to send this (bug-) report to I mailed it to your list.
Please write if I have to resend it somewhere else.
Thanks and regards
Here's the piece of code in question:
' ...
' Testen, ob Windows
If GetGuiType() = 1 Then
objMail = createUnoService("com.sun.star.system.SimpleSystemMail")
' Sonst Liux/Mac
Else
objMail = createUnoService("com.sun.star.system.SimpleCommandMail")
End If
' Zugriff auf Mail-Client-Programm
objMailClient = objMail.querySimpleMailClient()
' Message-Objekt erstellen
objMessage = objMailClient.createSimpleMailMessage()
' Nachrichtenempfänger setzen
objMessage.setRecipient(strEmailAddress)
' Betreff setzen
objMessage.setSubject(strSubject)
' Aktuelles Dokument als Anhang
mAttachment(0) = strDateiName
objMessage.setAttachement(mAttachment())
' MailClient öffnen
objMailClient.sendSimpleMailMessage(objMessage, 0)
' ...