Script to save mail as HTML

Hi Scripter,

I try to save my email as html by an applescript but it doesnt work. What is wrong? Why Entourage don’t understand the command “save as html”? Do anybody knows a solution?

—Script—
set xFolder to “HD:Users:MyName:Documents:”

tell application “Microsoft Entourage”
set xEmailFolder to folder “Inbox”
set xMessages to every message of xEmailFolder
set xSelectMessage to item 1 of xMessages
tell xSelectMessage
set xHTML to has html
if xHTML is true then
save in xFolder as text
–save in xfolder as html --HELP!!
end if
end tell
end tell
—Script End—

I tried also to save this as text file, but I loose the pictures. I need this pictures - they are important.

Can anybody help me?

Armin

MacOSX.2.8, Entourage.

If such images are hardcoded images (attachments), most probably you will loss the html format of your message (not the images, which will be included in your “saved as text” message, base64-encoded). Just grab the “source” of the message and parse it, to extract any text between tags. Save the images (attachments) to your disk. If you are an advanced coder, you could try replacing in the html code the embedded images with the propper link.
Otherwise, the fast way is save the message as text (“.eml”), so you can browse later the messages in Entourage again simply double-clicking them.