Mail: Save a complete message as RTF or RTFD

Hello,

Mail offers the functionality to save a message as RTF or RTFD (when attachments are present). Is it possible to access this via AppleScript?

I succeeded in saving the "content of message" as a text file, as well as saving attachments, but got stuck in the problem to save all as one RTF/RTFD file, exactly in the way the menu function "Save as..." does.

I hope that someone can help me. Thanks in advance!

Boris

macbook pro c2d, Mac OS X (10.5.6)

Posted on Feb 4, 2009 1:29 AM

Reply
10 replies

Feb 16, 2009 1:41 PM in response to iMad Richard

I've never done UI scripting, but I guess it would be a possible workaround. In my script, the user can select multiple messages which are then saved (so far as text only) and the file's date is set to the receipt date of the according message. - I might try to open the message window one by one, then "click" on the "save as..." menu item and close the window. But how would I obtain the name and path of the file to set its date?

Feb 17, 2009 11:58 AM in response to iMad Richard

Now I'm getting iMad Richard! I fill in the whole Saveas-dialog window by UI scripting! So first I need an AS-choose-filename dialog to catch the user's input, then use this to fill in the fields of the Saveas...

So I just need to find out how to do this UI scripting, but I'll manage that.

Thanks for that. Still, I leave this thread unanswered, because maybe maybe there's a direct AS way (or Apple might feel encouraged...).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mail: Save a complete message as RTF or RTFD

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.