Outlook Macro Stops Working (or Doesn’t Work to Begin With)?

A day or two after setting up my Outlook GTD macros (as explained here), they stopped working. When I clicked on the macro in the toolbar, used the shortcut keys, or clicked the macro icon in the Quick Access toolbar in Outlook, nothing happened. That was strange because everything worked the day before. I opened up the VB Editor from within Outlook (Alt+F11) and tried to run the macro from within the VB editor. That is when I saw what the problem was:

Something must have changed with the Microsoft security settings on my machine. Once I read the error message, I remembered when I originally created the macros several years ago (on my previous computer) I had to create a digital signature and sign the macros in order to get past the Trust Center security settings. Luckily doing so isn’t that complicated.

Step 1 – Create Personal Digital Certificate

The first thing you need to do is create a personal digital certificate. To do this, you need to run the SELFCERT.EXE program supplied by Microsoft Office. On my machine, the executable was located in the C:\Program Files\Microsoft Office\Office12 directory. Assuming you have access/authority to run the executable, locate the file and double-click it to start the program. This should bring up the Create Digital Certificate window.

Type in your name in the Create Digital Certificate dialog and click OK. The personal certificate has now been created on your machine.

Step 2 – Sign your macros using your digital certificate

Next you need to sign your macros using the personal certificate you just created. Open the macro file in the VB Editor (Alt+F11 in Outlook) and select the Digital Signatures menu item from the Tools menu. Click the Choose button to select a certificate.

You should see the certificate you created in the previous step.

Select the digital signature to use and click OK.

Make sure to save the VB project and close the VB editor.

Step 3 – Restart Microsoft Outlook

I’m not sure if this is required, but it seems like I had to restart Outlook for the macro signing to take effect.

Step 4 – Update the Trust Center

When you restart Outlook, and run the macro, it will either work or, depending on your settings, you may see the Trust Center security warning notice.

Click on the ‘Show Signature Details’ to verify that the macro you are trying to run is signed with your certificate. Assuming this is the case, click on the “Trust all documents from this publisher” button. The macro should now run.

Trouble shooting

If your macros still don’t work, or if you don’t see the Outlook Security Notice window when trying to run the macro, it could be that your Trust Center settings are blocking all macros without warnings. To check this setting, click on the Trust Center menu item from the Outlook Tools menu. Select Macro Security from the left panel and verify your Macro Security.

Have a great day!

Adding Macros to Outlook’s Quick Access Toolbar

In a previous post I described how to use Outlook macros to move selected emails to target folders.  This works great if you use the “Reader Pane” that’s part of the main Outlook window.  But if you are like me, I like to view my emails in a separate window (I have the Reader Pane turned off).  The problem with that is when I’m viewing an email, the Outlook tool bar is often hidden and the hot keys don’t work.  Luckily there is a simple solution: add your macros to the viewer’s quick access toolbar.

To do so, open up the email viewer and click on the ‘Customize’ button in the Quick Access toolbar and select More Commands from the pop-up window.

This will bring up the Editor Options panel.

Select Macros from the “Choose commands from:” drop down to display the macros you created.  Select a macro and click on the Add button to add the macro to the Quick Access Toolbar.  (Notice I added a separator as well.) If you want to choose a different icon or display name for the macro, select the macro just added to the quick access toolbar section of the panel and click on Modify to make the changes.  Click “OK” when complete.

You should now see the icons for the macros in the quick access toolbar.  To run the macro, simply click on the icon.  If you hover your mouse over the icon in the quick access toolbar, the name of the macro appears.

Have a great day!