Friday, 23 August 2013

Access messages in Outlook's 'Drafts' folder

Access messages in Outlook's 'Drafts' folder

I would like to use a message that is stored in the 'Drafts' folder as a
template for other messages. Unfortunately, I don't have the correct
syntax:
tell application "Microsoft Outlook"
-- locate the message
set theMessage to the first message in mail folder drafts <== error:
'Can't make mail folder id 107 into type integer'
-- show subject (testing)
display dialog of the subject of theMessage
-- for each contact with category 'foo'
-- copy message
-- add sender
-- add first name to message's body
-- set delivery date to 5 minutes in the future
-- send message
-- end loop
end tell
What am I missing?

No comments:

Post a Comment