I’ve successfully created a new outgoing message with the syntax:
make new outgoing message with properties {has html:“False”}
or
make new outgoing message with properties {has html:“True”}
But I can’t seem to find a syntax that will change the has html property of an EXISTING message. Is this possible? Does anyone know how to do it? Thanks in advance
Entourage, perhaps? If so, then I believe that - once a message has been created - its has html property is read only. (Since one can change the format manually, this does seem a rather curious omission… :/)
While by no means ideal, one way around this might be to use a little GUI scripting - possibly something like this:
tell application "Microsoft Entourage"
activate
open message id 4 of folder "Drafts" (* specify target message as required *)
tell application "System Events" to click menu item "HTML" of menu "Format" of ¬
menu bar item "Format" of menu bar 1 of application process "Microsoft Entourage"
tell window 1
save
close
end tell
end tell
We may have to go through this step-by-step, JJ. But first, let’s assume that the menus of menu bar items aren’t named in your version - and try something like this:
set target_draft to "My HTML Message" (* modify as appropriate *)
tell application "Microsoft Entourage"
activate
open (first message of drafts folder whose subject is target_draft)
tell application "System Events" to click menu item "HTML" of menu 1 of ¬
menu bar item "Format" of menu bar 1 of application process "Microsoft Entourage"
tell window 1
save
close
end tell
end tell