Clear Flags and Move Select Messages

Ease of Use


Version tested with


Submitted by:

Jacob Hilderbrand


This macro will clear the followup flag and move each selected message to a specific folder. 


You have several messages that you receive with followup flags. You simply want to select them all, then have a macro clear all the flags and move the messages to a new folder. This macro does just that. 


instructions for use


Option Explicit Sub MoveItems() Dim Messages As Selection Dim Msg As MailItem Dim NamSpace As NameSpace Dim Proceed As VbMsgBoxResult Set NamSpace = Application.GetNamespace("MAPI") Set Messages = ActiveExplorer.Selection If Messages.Count = 0 Then Exit Sub End If For Each Msg In Messages If Msg.FlagStatus = 2 Then Proceed = MsgBox("Are you sure you want to clear the flag and move the message " _ & """" & Msg & """" & " to the folder " & """" & "Idea" & """" & "?", _ vbYesNo + vbQuestion, "Confirm Procedure") If Proceed = vbYes Then Msg.FlagStatus = olNoFlag Msg.Move NamSpace.Folders("Personal Folders").Folders("Idea") End If End If Next End Sub

How to use:

  1. Open Outlook.
  2. Alt + F11 to open the VBE.
  3. Insert | Module.
  4. Paste the code there.
  5. Currently setup to move items to a folder called Idea. Change the folder name as needed.
  6. Close the VBE (Alt + Q or press the X in the top right corner.

Test the code:

  1. Tools | Macro | Macros...
  2. Select MoveItems and press Run.

Sample File:

No Attachment 

Approved by Anne Troy

This entry has been viewed 145 times.

Please read our Legal Information and Privacy Policy
Copyright @2004 - 2020 VBA Express