Using a Macro to Email PDFs. I am trying to do this using Mac OSX 10.6 & its Mail.app.
I get to a point where the Macro provided will open Mail.app, and inserts the desired xx.pdf file in the body of the email message.
But the Mail Recipient and subject lines fields are not filled in, event though I enter the name and subject line in the macro.
Inserted is the code I used:
Code: Select all
sub send_email
Dim eMailAdress as String
Dim eSubject as String
Dim eMailer as Object
Dim eMailClient as Object
eMailAdress = "alf@att.net"
eSubject = "Results"
'--------
eMailer = createUnoService("com.sun.star.system.SimpleCommandMail")
eMailClient = eMailer.querySimpleMailClient()
eMessage = eMailClient.createSimpleMailMessage()
eMessage.SetRecipient( eMailAdress )
eMessage.SetSubject( eSubject )
eMessage.setAttachement _
(Array(convertToUrl("Users/user/Documents/ORB/xx.pdf")))
eMailClient.sendSimpleMailMessage ( eMessage, _
com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE )
'---------
End sub
Thanks, alf50