Applescript for Outlook 2011 that moves all messages from a specific folder that match a source account to a different folder -


as title states "help applescript outlook 2011 moves messages specific folder match source account different folder."

so, have "rule" moves new mail on exchange account "inbox" in subfolder on computer. when delete items form subfolder inbox goes "deleted items" on computer. have made sub-folder "deleted items" in same place "inbox" sub-folder , run applescript on schedule can go main deleted items on computer , find messages exchange account , move them "subfolder/deleted items".

googling cobbled below move mail in deleted items:

tell application "microsoft outlook" set topfolder mail folder "at&t" of on computer set destfolder folder "deleted items" of topfolder move every message of mail folder "deleted items" of on computer destfolder end tell 

the part can't past selectively moving mail "account" specific value, thus:

tell application "microsoft outlook" set topfolder mail folder "at&t" of on computer set destfolder folder "deleted items" of topfolder move (every message of mail folder "deleted items" of on computer account = "att") destfolder end tell 

the last addition of trying filter account kicks error

microsoft outlook got error: can’t make account type specifier. 

any appreciated!!

devised solution works. instead of single line, selected messages in folder , looped through them, grabbing account name text , doing compare , move.

tell application "microsoft outlook"     set topfolder mail folder "at&t" of on computer     set destfolder folder "deleted items" of topfolder     set srcfolder mail folder "deleted items" of on computer     set selectedmessages messages of srcfolder     repeat themessages in selectedmessages         set thisaccount account of themessages         if (name of thisaccount text "att")             if (is read of themessages false)                 set themessages's read true             end if             move themessages destfolder         end if     end repeat end tell 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -