Page 1 of 1

Macro Android AndrOpen calc

Posted: Mon Dec 16, 2019 10:41 am
by Kusk
Hej, I'm new and Danish
I'd tried to send a email with e-mail adress, subject and body in calc macro, but it wouldn't work in AndrOpen, but in OpenOffice on win10 with Thunderbird

Code: Select all

  eMailAddress = "xx@xxxx.dk"
eSubject = "TEST"
eMailer = createUnoService("com.sun.star.system.SystemMailProvider")
eMailClient = eMailer.queryMailClient()

eMessage = eMailClient.createMailMessage()

eMessage.Recipient = eMailAddress
eMessage.Subject = eSubject
eMessage.Body = "Message"
AttachmentURL = convertToUrl("file:///storage/emulated/0/FOLDER/PDF/") & Filename & restid & ".pdf"

eMessage.Attachement = array(AttachmentURL)
eMailClient.sendMailMessage ( eMessage,0 )' Yes button pressed
'eMailClient.sendMailMessage ( eMessage, com.sun.star.system.MailClientFlags.NO_USER_INTERFACE ) (tried this as well)
Else
  ' No button pressed
End IF

Re: Macro Android AndrOpen calc

Posted: Sun Feb 02, 2020 1:34 pm
by Zizi64
Which Email client software do you have on your Android device?
This macro requires a real Email CLIENT software. The webmail services (like the Google mail, Outlook) are not Email client softwares.

(The last MS related Email client software was the "Outlook Express". The "Outlook" is an another, and basicly different software.)

Re: Macro Android AndrOpen calc

Posted: Sun Feb 02, 2020 3:22 pm
by Kusk
Hei
I have tried various mail programs in Android Google Play like Email for Hotmail, Gmail - Email Blue Mail - Microsoft Outlook free for Android and others without success-
On windows I use Thunderbird which is not made for Android and on here it works.
The attachment is ok, but subject and body are missing :-)