Applescript to move contents of one email folder to another
Our new cloud based mail system automatically deletes an item out of the Deleted Items folder when it has been deleted for 30 days. I am attempting to create an applescript that will run daily and move the contents from the Deleted Items folder to a second folder, titled "Trash" to prevent from permanently losing the items that are deleted. Here is what I have so far:
on run
tell application "Microsoft Outlook"
move every message of mail folder "Deleted Items" to mail folder "Trash"
end tell
end run
When I run the script as is above, nothing happens. I created two test folders (Test 1, Test 2) and when I place a few emails in Test 1 and rerun the script with the updated folder names (move every message of mail folder "Test 1" to mail folder "Test 2"), I can get them to move. Can this not be done on a 'built-in' folder like Deleted Items??? Any suggestions are greatly appreciated.
iMac, OS X Mountain Lion (10.8.2)