Hi there,
I would like to get the Outlook message id of a message that’s currently being composed. When I have finished composing an email I would like to run a script that closes the message, saving it into the drafts folder and returning that messages id so that I can refer back to it later. The problem that I’m having is trying to get the id of a message that’s still being composed.
This is the second part of the script that gives me the message id of a draft message:
tell application "Microsoft Outlook"
set draftsFoldersList to every mail folder whose name is "Drafts"
repeat with thisDraftFolder in draftsFoldersList
set messageCount to count of messages of thisDraftFolder
if messageCount > 0 then
repeat with i from 1 to count of messages of thisDraftFolder
set thisMessage to message i of thisDraftFolder
set messageProps to properties of thisMessage
set messageid to id of messageProps
end repeat
end if
end repeat
end tell
I tried this:
tell application "Microsoft Outlook"
set messageProps to properties of window 1
set messageid to id of messageProps
close window 1 saving yes
end tell
but it only gives me the window id not the message.
Any ideas would be appreciated.
Thanks,
Nik