Outlook Keyboard Shortcuts to Move a Message to a Folder

Published in General on Tuesday, June 6th, 2006

Ever wished that you could click alt+1 on your keyboard and have a hilighted message sorted into the correct folder in Outlook? Me too. I've been looking for an easy solution for this for a while but never really dug in to figure it out. Now I have the answer!

Inbox Zero

So I've been following Merlin Mann's Inbox Zero series from the fringes, interested in the concepts and envious of the many mac only solutions that he provides.

I've wanted a one click solution for organizing my inbox for some time, and looked but not found the answer. Well, spurred on by my new blog (plug), and the fact that I am waaay behind on a lot of e-mail (sorry to those still waiting for a reply) I've found a solution.

Three steps to two button Outlook e-mail sorting

What I am talking about here is having the ability to use a keyboard shortcut that shunts a selected/hilighted message in your Outlook inbox into a determined folder. In this manner, you can quickly sort a busy inbox into action/response/received messages, for example.

Note that I am using Microsoft Outlook 2003 on a Windows XP setup to do this. Your mileage may vary.

The process involves three relatively simple steps:

  1. Create a macro to move the e-mail to a specified folder.
  2. Create a digital certificate for the macro.
  3. Create a toolbar and keyboard shortcut to fire the macro with ease.

So, lets look at these in details...

1. Create a macro to move the e-mail to a specified folder

A little bit of googling brought me to Outlook Macro to Move an Email to Folder. This really made things easy.

You are going to want to take the code from that example and use the instructions found at Create a macro.

Keep in mind that you need to replace _Reviewed in the following line of code with the folder where you are moving your mail to: Set objFolder = objInbox.Folders("_Reviewed"). Also, the target folder has to be in the inbox.

2. Create a digital certificate for the macro

Once you've made your macro, Outlook (or winXP) will block the macro from running if your security settings are higher than low, which most people's are. To get around this you need to add a digital signature to the macro.

Fine, so where do you get the digital signature file?

I found the answer at OFF2000: Using SelfCert to Create a Digital Certificate for VBA Projects. Follow those instructions (it's quite simple) and then come back here for the next part.

Next we need to add the signature to the macro. Also quite easy, following the instructions at Add a digital signature to a macro project.

3. Create a toolbar and keyboard shortcut to fire the macro with ease

Here I refer you to the Outlook 2003 tip o' the day which teaches one how to add a new button to the toolbar and give it a keyboard shortcut. For our purposes, on step 3 of that article you will want to choose macros from the left hand pane and then the macro you wrote from step 1 from the right hand pane.

And that's it!!

In the end it was quite simple. I have no idea why it took me so long to find the answers to doing this (this has been on the wish list for awhile). I suspect I had some luck somewhere along the line this morning with some fortuitous googling finding me the right answers :).

Comments and Feedback

If you're using Outlook 2003, why don't you use flags and search folders instead? Just right-click on the little flag and select a colour, then add a search folder for each of the colours you use.

Hey Svante,

Another strategy for sure, and I had tried that at one point.

But... either way, I'd still want a shortcut that I can press to flag up a message or group of messages, as it's simply faster then having to right click and select.

Thank you! I've been needing a move to folder macro for quite some time....

I already had rules set up to handle certain very predictable message types, such as my case assignment and update notices. What I didn't have was an efficient method of dealing with all the other email.

Now I do. There's 4 things I'm likely to do:

(1) Reply.

(2) Take action based on message (move to @Action folder. If I could figure out how to add a coloured flag to it in the macro also, I'd be a happy camper.)

(3) Zap message by moving it to the All Mail archive folder.

(4) Keep message by moving it to the Important Info archive folder.

Glad it helped Bronwyn!

This sounds great.

I would adopt this macro in a minute if the limitation to "the target folder has to be in the inbox" could be overcome.

I tried this, but it didn't work:

Set objFolder = objPersonalFolders.Folders("_Reviewed")

Anyone have any ideas?

You can name your flags and give them keyboard shortcuts. See this link for more info.

I should also mention that the Insert key Red Flags an unflagged message or marks a flagged message as complete. Ctrl-Shift-G will bring up the Flag for Follow Up dialog (but only for single messages).

@Francis: Thanks for the tips!

@Michael: I hear you, I sort of needed what you are after too, but in the end I bent to moving the folders to my inbox. I'm sure the code is out there somewhere...

To reference an arbitrary folder, try


Set objFolder = objNS.Folders("A top-level folder not in the Inbox")

or


Set objFolder = objNS.Folders("Top-level folder").Folders("Nested folder")

See this link for more info.

Thanks Francis, I'll give that a go...

Re: Create a macro to move the e-mail to a specified folder - His blog has moved. I found the article at:

http://verychewy.com/archive/2006/04/12/outlook-macro-to-move-an-email-to-folder.aspx

Home » Blog » General

Check out the blog categories for older content

The latest from my personal website,
Mike Papageorge.com

SiteUptime Web Site Monitoring Service

Sitepoint's web devlopment books have helped me out on many occasions both for finding a quick solution to a problem but also to level out my knowlegde in weaker areas (JavaScript, I'm looking at you!). I am recommending the following titles from my bookshelf:

The Principles Of Successful Freelancing

I started freelancing by diving in head first and getting on with it. Many years and a lot of experience later I was still able to take away some gems from this book, and there are plenty I wish I had thought of beforehand. If you are new to freelancing and have a lot of questions (or maybe don't know what questions to ask!) do yourself a favor and at least check out the sample chapters.

The Art & Science Of JavaScript

The author line-up for this book says it all. 7 excellent developers show you how to get your JavaScript coding up to speed with 7 chapters of great theory, code and examples. Metaprogramming with JavaScript (chapter 5 from Dan Webb) really helped me iron out some things I was missing about JavaScript. That said each chapter really helped me to develop my JavaScript skills beyond simple Ajax calls and html insertion with libs like JQuery.

The PHP Anthology: 101 Essential Tips, Tricks & Hacks

Like the other books listed here, this provides a great reference for the PHP developer looking to have the right answers from the right people at their fingertips. I tend to pull this off the shelf when I need to delve into new territory and usually find a workable solution to keep development moving. This only needs to happen once and you recoup the price of the book in time saved from having to develop the solution or find the right pattern for getting the job done..