Adding a VBA Macro to Outlook

Silly me.  When I posted the macros to create Outlook appointments based on email messages and to schedule your drive time, I failed to explain how to add VBA Macros to Outlook.  Well here's how:

  1. For the macro that you want to add, like NewMeetingRequest.bas, right-click on the file hyperlink in Internet Explorer and select Save Target As... and save it to your desktop or in Firefox, click on the hyperlink and select File...Save Page As...and save it to your desktop. (Remember the location where you saved it).
  2. Start Microsoft Outlook 2007
  3. In the Tools menu, select Macros...Visual Basic Editor
  4. In the Visual Basic Editor, you should see a project explorer in the left hand pane.  If you don't see it select View...Project Explorer:
  5. Select File...Import File... and select the .bas file that you downloaded in step 1.  Doing so will add the module to Outlook and it will be listed in the Modules folder.
  6. Now you might want to add the macro to the Quick Access Toolbar in one of the item explorers in Outlook.  To do this, open an explorer by double-clicking on the item in Outlook (like a contact, an appointment, an email message, etc.).  Each class of explorer has its own Quick Access Toolbar, so if you want to add a macro to the quick launch toolbar of existing emails, open an existing email; if you want to add a macro to existing appointments, then open an existing appointment.
  7. Click on the Customize Quick Access Toolbar button and select More Commands... from the menu.
    This is not a real email message (but I'd love to have dinner with Mr. Gates.)
  8. Change the Choose commands from drop down to Macros.
  9. Select one of the macros in the left list and press the Add >> button to add it to the Quick Access Toolbar button list on the Right.
  10. With the new button selected on the right, press the Modify button below to select a new icon and/or display name (to show when hovering over the button); press OK.
  11. Press OK again to save the changes to the Quick Access toolbar

Now the macro is hooked up to a button in the Quick Access toolbar and ready to use.