Applescript outlook search mail
Hi,
is there anyway to seach within outlook via applescript?
I would like to find a way to find flagged mail then perform an action on it.
i can do somthing like:
set thisAccount to exchange account "MYEXCHANGEACCOUNT"
set thisFolders to mail folder of thisAccount
repeat with theFolder in thisFolders
if name of theFolder is "Inbox" then
set selectedMessages to messages of theFolder
repeat with theMessages in selectedMessages
if ((todo flag of theMessages) is not completed) then
--Send to OmniFoucs
end if
end repeat
end if
end repeat
how ever the line
set selectedMessages to messages of theFolder
takes a very long time - seems its assigning all the emails into a list and takes forever, maybe i can refenerence them somehow?
you can do the following in mail :
set _msgs_to_capture to (a reference to ¬
(every message of _inbox ¬
whose flagged status is true))
This is very fast but i cant find anyway to this for outlook.
Smart Folders work really quickly - can i access them anyway in applescript?
Thanks,
Wes
OS X Mountain Lion (10.8.2)