How to Create a VBA Macro for Outlook 2007

Written by tiesha whatley
  • Share
  • Tweet
  • Share
  • Email

Macros allow you to automate routine tasks in Microsoft Office applications. In Outlook 2007, macros can be used to organise e-mail messages, delete completed tasks or set up new calendar items. There are two ways to create a new macro in Outlook 2007. You can record the macro while performing a task and set the options so the macro can do it automatically next time. Or, for more complex and advanced operations, you can use the VBA (Visual Basic for Applications) function in Outlook 2007.

Skill level:


  1. 1

    Open the Visual Basic Editor in Microsoft Outlook 2007. Click "Tools > Macro > Visual Basic Editor."

  2. 2

    Select the module that you want to add a new macro to in the left-side pane of the "Project" window. The main module is named "ThisOutlookSession." You can add the new macro to this module if you are unsure of which one to add to.

  3. 3

    Click "Insert > Procedure" on the toolbar. Give the VBA macro a name by typing it in the "Name" box and clicking "OK."

  4. 4

    Add the VBA code to the new procedure that opens up in the code module window. Click the "Save" icon on the toolbar and close the Visual Basic Editor once you finish with the code.

Tips and warnings

  • Click "Tools > Macro > Macros" to run the macro. Click on the name of the macro you just created and click "Run."

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.