Mac Outlook 2011 Move to Folder Macro and Shortcut
Background
If you're accustomed to the Gmail workflow, you probably want a keyboard shortcut to be able to "Archive" messages quickly. This is a method to do this for Mac Outlook 2011 (I believe Mac Outlook 2007-2010 did not support macros, so this probably wouldn't work on those versions). More generally, this allows you to move selected messages to a given folder using a customized keyboard shortcut. This is based on information and scripts from the following sites:
HOWTO
- In the Outlook menu bar, click on the script symbol to the right of the Help menu. Click "About This Menu..." and "Open Folder".
- Copy the following file to the folder (contents shown below). This assumes you have a folder names "Archives" to which you want the message moved that is "On My Computer" (if it is a different account than "On My Computer", you can uncomment the account line below to use the current account or specify a different account). You can edit the file to change the name to the folder you desire (it is assumed you have already created the folder in Outlook). If, e.g., "Archives" was a subfolder of "Inbox", you would specify it as "set archiveFolder to folder "Archives" of folder "Inbox" of theAccount".
- Open the file in AppleScript Editor (should be the default for .scpt files). With a test message selected, you can click the "Run" button to verify the test message is moved to the desired folder. In the AppleScript Editor, do "Save As" and set the "File Format" to "Script Bundle". Save it to the same folder and it should have a .scptd extension now and be a directory. This step is necessary to get your script to show up in Outlook's script menu (which is necessary for the keyboard shortcut). Now, if you click on Outlook's script symbol again, you should see your script as one of the selections (it will be named the same as the script's file name without the .scptd extension).
- Now, you need to create a standard application keyboard shortcut. Click the Apple logo in the upper left hand corner -> "System Preferences..." -> "Keyboard" > "Keyboard Shortcuts". Add an application shortcut for Outlook and as the "Menu Name", enter the name of your script as it appears in the Outlook script menu (i.e., without the file extension). For me, I chose ALT+1 as my shortcut, but choose whatever works best for you.
- Go back to Outlook, highlight a test message, do your keyboard shortcut and it should work now.
on run {} tell application "Microsoft Outlook" activate set msgSet to current messages if msgSet = {} then error "No messages selected. Select at least one message." error -128 end if set theMsg to item 1 of msgSet set theAccount to account of theMsg --set archiveFolder to folder "Archives" of theAccount set archiveFolder to folder "Archives" of on my computer repeat with aMessage in msgSet move aMessage to archiveFolder end repeat end tell end run