Hi, Is there anyway to select e-mails using AppleScript? I want to select e-mails and run some automation scripts from outlook app. We are able to do this for Apple Mail app. Can we do the same from Outlook app? Any help appreciated!!! Thanks
tell application "Microsoft Outlook"
activate
set theMessage to {}
set theAccount to the first exchange account whose name is ""
set selected folder to sent items of theAccount
repeat with each in theArrayOfSubject
set end of theMessage to (first message of sent items of theAccount whose subject contains each)
end repeat
set selection to theMessage
set choosenmesg to {}
set selectedMessages to selection
repeat with eaitem in selectedMessages
set end of choosenmesg to subject of eaitem
end repeat
return choosen_mesg
end tell
activate
set theMessage to {}
set theAccount to the first exchange account whose name is ""
set selected folder to sent items of theAccount
repeat with each in theArrayOfSubject
set end of theMessage to (first message of sent items of theAccount whose subject contains each)
end repeat
set selection to theMessage
set choosenmesg to {}
set selectedMessages to selection
repeat with eaitem in selectedMessages
set end of choosenmesg to subject of eaitem
end repeat
return choosen_mesg
end tell