Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I love the customizable "Quick Actions" at the top and I've set some up to move things to various folders or convert messages to appointments, etc. One thing I still can't figure out how to do, though, is have a button that will select all messages in a folder, and move them to another specified (preconfigured) folder.

Basically, from my inbox, I want a single button to move all my mail into another folder for me, without having to hit Ctrl+A to select them all first.

Is this possible?

share|improve this question
up vote 3 down vote accepted

It is possible; you'll need to write a macro to do it though.

From "Writing an Outlook Macro":

A macro is any public subroutine in a code module. A function or a private subroutine cannot be a macro, and a macro cannot be located in a class or form module.

To create a new macro

  1. In Outlook, point to Macro on the Tools menu, and then click Visual Basic Editor.
  2. In the Project window, double-click the module you want to contain the macro.
  3. On the Insert menu, click Procedure.
  4. In the Name box, type a name for the macro. The name cannot contain spaces.
  5. Click OK. (The template for the macro subroutine appears in the code module window).
  6. Type the code you want to run in the body of the subroutine.

Here's some example (untested) code to get you started:

Sub MoveItems() 

  Dim Messages As Selection 
  Dim Msg As MailItem 
  Dim NS As NameSpace 

  Set NS = Application.GetNamespace("MAPI") 
  Set Messages = ActiveExplorer.Selection 

  If Messages.Count = 0 Then 
    Exit Sub 
  End If 

  For Each Msg In Messages 
    Msg.Move NS.Folders("Personal Folders").Folders("SavedMail") 

End Sub 
share|improve this answer
With a little tweaking, and learning about Macros in Office 2010, I got this working. Thank you! – qJake Jul 29 '11 at 16:13
@SpikeX -- Can you post your finished code with the tweaks you made? I'd like to do this as well. Thanks. – Jon Crowell Jul 12 '12 at 17:53
My code has company-specific information in it that I can't share. The example here provides a good enough example of what needs to be done, you just need to tailor it to your specific folder/account names. – qJake Jul 12 '12 at 17:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.