Changing the "has html" property of an existing outgoing message

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

JJ

Well… that syntax sure ain’t from Mail.app, JJ. :wink:

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

Kai sorry for not mentioning that it was “Entourage” that I was working with.

I took out “ID” in the open message line and that worked but the next line gave this error:

AppleScript Error

System Events got an error:
NSReceiverEvaluationScriptError: 4

After clicking “OK” this part was highlighted:

click menu item “HTML” of menu “Format” of menu bar item “Format” of menu bar 1 of application process “Microsoft Entourage”

I changed the line to:

click menu item “Close” of menu “File” of menu bar item “File” of menu bar 1 of application process “Microsoft Entourage”

to see if maybe the “HTML” menu item was ‘special’ but it gave the same error and the window did not close. By the way it is Office 2004 v11.2.1

Again thanks for your help. JJ

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