As the Title states "Help with an Applescript for Outlook 2011 that moves all messages from a specific folder that match a source account to a different folder."
So, I have a "rule" that moves all new mail on my exchange account into a "Inbox" in a subfolder On My Computer. When I delete items form this subfolder inbox it goes into the "Deleted Items" On My Computer. I have made a sub-folder for "Deleted Items" in the same place as my "Inbox" sub-folder and I would like to run an Applescript on a schedule that can go into the main Deleted Items On My Computer and find the messages from that exchange account and move them into "subfolder/Deleted Items".
Googling about I cobbled the below together which will move ALL mail in Deleted Items:
tell application "Microsoft Outlook"
set topFolder to mail folder "AT&T" of on my computer
set destFolder to folder "Deleted Items" of topFolder
move every message of mail folder "Deleted Items" of on my computer to destFolder
end tell
The part I can't get past is now only selectively moving mail whose "account" is a specific value, like thus:
tell application "Microsoft Outlook"
set topFolder to mail folder "AT&T" of on my computer
set destFolder to folder "Deleted Items" of topFolder
move (every message of mail folder "Deleted Items" of on my computer whose account = "Att") to destFolder
end tell
the last addition of trying to filter by account kicks up the error
Microsoft Outlook got an error: Can’t make account into type specifier.
Any help appreciated!!