Multipart messages in Entourage

I’m trying to script the creation of a multipart message (text and html alternate) and I’m struggling to get

tell application "Microsoft Entourage"
	set theMessage to make new outgoing message with properties {subject:"Dude... Vista", sender:"iSteve <steve@apple.com>", recipient:"Bill <bgates@microsoft.com>"}
	make new part at theMessage with properties {type:"text", subtype:"plain", content:"Give it up."}
end tell

But the part creation is just resulting in “Can’t make class part”. Is this just fundamentally not going to work or am I missing something?

Jon

Hi masaccio,

I do not want to discourage you, but looking at Entourage’s AppleScript dictionary I can see that all elements of the part class are read-only (r/o). So I guess you cannot create an instance of this class yourself, but only access it as a part of incoming or existing messages.

Also searching Google did not result in many hits, which is always a bad sign…

Hey Martin,

Record response time there in that thread!

Ack on the Google no-hit-no-help problem: always a bad sign. But looking at http://www.microsoft.com/mac/developers/default.mspx?CTT=PageView&clr=99-21-0&target=0a1c64f6-9adb-42fb-a4d5-21142bc8a70b1033&srcid=40d869d3-e1a6-4bce-9e5b-fb5b87bec3f41033&ep=7, I see the Microsoft example is creating an attachment and specifying a property that the Dictionary says is read-only, so that’s why I thought I might be on a path that might lead somewhere.

I feel like I’m running around in circles trying to script the creation of a message. Pity there’s no Entourage Reference to accompany those Word and Excel ones :frowning:

Jon

I don’t have a lot of scripting experience with Entourage as I am using Apple Mail, but the code example on Microsoft’s website seems to be absolutely okay, I don’t see anything wrong with it. If you look at Entourage’s draft window class, you can see all of the used elements, and they are not read-only.

You might also be interested in this website.

Thanks, I’ll take a look.

Jon