Does anyone know how to change the class of an Entourage message from
incoming to outgoing via AppleScript? I have tried the following:
on run
tell application “Microsoft Entourage”
set theMessages to the selection
repeat with theMsg in theMessages
my changeStatus(theMsg)
end repeat
end tell
end run
on changeStatus(theMsg)
tell application “Microsoft Entourage”
set class of theMsg to outgoing message
end tell
end changeStatus
I always get the error message as follows:
tell application “Microsoft Entourage”
get selection
{incoming message id 1162}
set class of incoming message id 1162 to outgoing message
“Microsoft Entourage got an error: Unknown object type.”
Not sure, but I’d say it can’t be done. There are certain incompatible properties in these two objects (outgoing/incoming). You may better duplicate the message or “redirect” it, I think.
Thanks for the quick response. I have managed to generate the following script to create a redirected message which has the effect of making it an outgoing message as per your suggestion. However, how do I get the From: To: Cc: & Bcc: information from the old message into the redirected message?
on run
tell application “Microsoft Entourage”
set theMessages to the selection
repeat with theMsg in theMessages
my redirectedmsg(theMsg)
end repeat
end tell
end run
on redirectedmsg(theMsg)
tell application “Microsoft Entourage”
redirect theMsg
end tell
end redirectedmsg