Outlook for Mac

AppleScript to save a message as pdf is not working properly

Unanswered 0 answers

Older post from December 16, 2013. Details may be out of date.

Question asked on Dec 16, 2013
For use in other programs (like Filemaker) we like to have every message (incoming and outgoing) available as a pdf.
In appleScript this can be automated using the "print" command from the Outlook AppleScript Dictionary.
The properties to be associated with this command are "as pdf:true" and "path name: URL to the destination file".
One would expect that this would save the current message as a pdf on a predefined location (e.g. a folder on the Desktop), but this is not working.

For the sake to completeness, here is the basic script as an example:

tell application "Microsoft Outlook"

set myMessage to item 1 of (get current messages)

tell myMessage

print myMessage with properties {as pdf:true, path name:"file:///MAC HD/Users/BDJ/Desktop/FMTemp/test.pdf"}

end tell

end tell


Unfortunately, this script is sending the message to the default printer (our office printer) and we get a printed copy.

Is there anyone who can clarify?
Is it a mistake in the script, or is there a problem with this command?

Thank you.
Bernard.

No answers yet

Write an answer

Your email address will not be published. Please never post passwords.

This site uses Akismet to reduce spam. Learn how your comment data is processed.