Friday, March 28, 2014

How do I make an Outlook Template?

Word, Excel, and PowerPoint all have easy template options for creating new documents based upon a sample file. Outlook, however, does not make it quite as easy! I needed to keep creating the same email on a daily basis, so here's what I did:
  1. Create a sample file in Outlook:


  2. Then we need to save this sample email as a template file, just like we would in Word or Excel. Pay close attention to where you are saving this file. You will need the complete path to the file in a minute.


  3. Now we are going to create a macro that will let us open a new email from a template, something that is NOT available in Outlook like it is in the other office products. Additionally, Outlook does not let you record macros, only write them in visual basic code. Fortunately, our code will be short and sweet. First we need to go to the "Developer" tab and click "Visual Basic"
  4. A "Microsoft Visual Basic for Applications" (also known as VBA) window will open. Right Click on "ThisOutlookSession" and choose to "Insert" a "Module". This will give you a window where you can enter some lines of instructions.

  5. Now we need to enter the following code into the right-hand window. Replace red italicized words with your own counterpart.

    Sub NAME_OF_TEMPLATEMACRO()
    Set newItem = Application.CreateItemFromTemplate("c:\folder\template.oft")
    newItem.Display
    Set newItem = Nothing
    End Sub


    Here is an example in my case:
  6. Now save and close the developer window. Before you can use your new macro you need to enable support for macros in Outlook. On the "Developer" Tab Click "Macro Security". This will open the "Trust Center" window where you can configure "Macro Settings". To enable macros without prompting choose the 4th radio button labeled "Enable all macros." To enable macros with a dialog prompt each time choose "Notifications for all macros". Click "OK" and Close Outlook, and then reopen Outlook to reinitialize Macro Security Settings.
  7. Now that Macros are enabled, you can launch your template from the developer tab under Macros:
  8. This opens your template up as a new file, but is not a very convenient. What would be nice is a shortcut in the Quick Access Toolbar above that would be available while looking at any tab! Here's how. Click on the dropdown arrow at the right hand side of the Quick Access Toolbar:
  9. In the "Outlook Options" window that opens choose "Macros" from the list of command types to choose from:
  10. Find your macro in the list of commands below and then click "Add" so that a button for the macro will be added to the Quick Access Toolbar. Then click "Modify" so we can change the appearance of the button:
  11. Pick the most meaningful Icon you can find from the symbols given and click "OK" and then "OK" on Outlook Options" window.
  12. You will now see your Icon on the Quick Access Toolbar from the moment you open up Outlook:
  13. Click your Icon and you will see your template appear as a new email, waiting to be completed!
So there you have it. Microsoft Outlook has templates, but you need to be a little bit crafty to make them easy to use. May all your emails be delivered on the wings of internet eagles, and you inbox be spam-free.
-Majorbacon
 

No comments: