short banner

Create an Email Macro with Its Own Button

March 12, 2012

I have talked before about creating Outlook 2010 email templates, but why not create a macro to speed things up even more? Then, add your new macro to the Quick Launch bar at the top, and SNAP it’s there!
NOTE: The only way to record a macro in Outlook is to write the code in VBA, but don’t let that scare you. You can do this!

The first thing you will need to do is enable the process:

  1. Press the File button next to the Home tab and choose Options.
  2. Select the section Customize Ribbon.
  3. In the right pane, enable the selection field before “Developer”.
  4. Press OK to close the open dialog.

Next, create a new email template:

  1. On the Home tab click  New E-mail 
  2. Customize your email as required with recipients, subject, etc.
  3. Click File and then Save As 
  4. Edit File Name (e.g. MyTemplate) and change Save as Type to Outlook Template (.oft) 
  5. Click Save. (By default file is saved in C:\Documents and Settings\<username>\Application Data\Microsoft\Templates)

Now create the macro:

  1. On the Developer tab click Macros.
  2. Type in a Macro Name (e.g. MyTemplate) and click Create.
  3. A VBA screen opens, with the cursor in between Sub and End Sub. Copy the following text in this space:

Set msg = Application.CreateItemFromTemplate("C:\Documents and Settings\<username>\Application Data\Microsoft\Templates\MyTemplate.oft")
msg.Display

The full text in the macro should now look like this (obviously with path and file name amended to contain your username and the name of the template):

Sub MyTemplate()
Set msg = Application.CreateItemFromTemplate("C:\Documents and Settings\<username>\Application Data\Microsoft\Templates\MyTemplate.oft")
msg.Display
End Sub

Create a Quick Access button at the top to open your template:

  1. Click the little down arrow on the right side of the Quick Access toolbar (above the ribbon on the left) and choose More Commands.
  2. In the drop down list “Choose commands from” select: Macros.

            The list below will now show all of your macros.

  1. Select the macro that you wish to create a button for and press the Add >> button.
  2. To modify the name and icon press the Modify button.
  3. Close the Editor Options dialog.
     

 

Contact Information

Archive of Tips

 Computer Tutorials 

Tips by Programs

Access 

Excel 

Outlook 

PowerPoint 

Word