• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

How to Open Outlook Templates and Files using Toolbar Buttons

Slipstick Systems

› Outlook › How to Open Outlook Templates and Files using Toolbar Buttons

Last reviewed on May 20, 2025     124 Comments

When you want to open a template, you need to go through the Choose Form dialog, which is a few more steps than most users want to take. In older versions of Outlook you could create Hyperlink buttons but Outlook 2010 and newer doesn't support hyperlink buttons and tighter security in Outlook now means you need to respond to a warning dialog before the template (or hyperlinked file) opens.

A PowerShell version to open templates is at Open Outlook Templates using PowerShell

You have some options to make using templates easier: Pin the template to Outlook's taskbar icon, Copy it into a folder in your data file, drag it to your desktop, or use a macro to open it.

If the template does not contain controls that require you to open it from the Template folder, you can store the template in other locations, including the Documents folder or Desktop; pin it to the Outlook icon on the taskbar, or copy it into a folder in your Outlook data file.

Pinned Templates

All email templates and some calendar and contacts templates can be opened using these methods. Templates containing scripts or some controls must be opened using the Template dialog.

Email templates that are pinned to the Outlook button on the taskbar are accessed by right-clicking on the Outlook button or you can copy the template to a folder in your Outlook data file. Recently used templates that are not already pinned may be listed on the Outlook icon's right-click menu.

pinned and recent templates

To pin a template in windows 11 open it then look on the jump menu and pin it. In windows 10 and older, you can drag it from the template folder at C:\Users\%username%\AppData\Roaming\Microsoft\Templates and drop on the taskbar button. To copy it to an Outlook folder, drag it to the desired folder. (I use a folder named Templates).
drag the template to pin

 

Open templates using a toolbar button

If you prefer to use a button on Outlook's toolbar, you can use a macro to open the template. To disable the warning message, you need to set a registry key.

See Disable the Unsafe Hyperlink Warning when Opening Attachments for the instructions to disable the warning dialog and the Open or Save dialog. Use this registry value with Outlook 2010 and newer if you add files to Outlook's Shortcut navigation pane.

To create a button on the toolbar that will open a template in Outlook 2010 and up, you need to use a macro as it does not support hyperlink buttons found in older versions of Outlook. Additionally, opening a template hyperlinked to a toolbar button in Outlook 2007 brings up a security dialog.

If the template contains custom fields, the customizations will be disabled, and the template will be blank. These templates need to be opened using the Choose Form dialog. When you try to open the form, a dialog will open with this message:

Access to this form template file is blocked. If you trust the source of the form, on the Home tab, click New Items, click More Items, and then click Choose Form. In the Look In list, click User Templates in the File System, and then select and open the template you want. Get more information about opening an .oft file.

Template warning

The solution

Create a macro that replicates opening a template from the Choose Form dialog using the Application.CreateItemFromTemplate method:

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

Press Alt+F11 to open Outlook's VB Editor then copy and paste this macro into ThisOutlookSession. Add it to the ribbon or QAT. See How to use the VBA Editor for complete instructions to use the VB Editor. See Customize the QAT if you need help customizing the QAT.

If you want to use a macro to open different templates, assign the template path to a variable and pass the variable to the macro, like this:

Dim template As String

Sub OpenTemplate1()
template = "C:\Users\Diane\Templates\template1.oft"
MakeItem
End Sub

Sub OpenTemplate2()
template = "C:\Users\Diane\Templates\email.oft"
MakeItem
End Sub

Private Sub MakeItem()
Set newItem = Application.CreateItemFromTemplate(template)
newItem.Display
Set newItem = Nothing
End Sub

Send message to Contact using a template

This version of the macro will use a template to send a message to the selected contact.

This macro works with the selected contact. You can use it if a contact is open, as long as the contact is also the selected item. If you open a contact, read an email then switch to the already-open contact, you will need to use the GetCurrentItem function on this page: Outlook VBA: Work with Open Item or Selected Item

Sub SendToContact()
Dim strAddress As String
Dim objItem

Set objItem = Application.ActiveExplorer.Selection.Item(1)

 If objItem.Class = olContact Then
     strAddress= objItem.Email1Address & ";"
 End If
     
Dim newItem as Outlook.MailItem
Set newItem = Application.CreateItem("C:\path\template.oft")
newItem.To = strAddress
newItem.Display
End Sub

Open a Template and Add an Attachment

If you want to add an attachment to the message at the same time you open the template, you'll use newItem.Attachments.Add "C:\myfile.doc". Add it to your code after the line that opens the template (DUH!) and before the message is displayed (newItem.Display).

The macro will look something like this:

Sub AddAttachment ()
Dim newItem as Outlook.MailItem
Set newItem = Application.CreateItem("C:\path\template.oft")
newItem.Attachments.Add "C:\myfile.doc"
newItem.Display
End Sub

 

Open a published form

If you want to open a published form, use this code to call the form. You need to be viewing the folder you want the item to be saved in.

Use GetDefaultFolder function to use the default folder for the custom form type. For example, change the Set items line to this the following to create an appointment or meeting in the Calendar folder from any other folder:
Set Items = Session.GetDefaultFolder(olFolderCalendar).Items

Public Sub OpenPublishedForm()
   Dim Items As Outlook.Items
   Dim Item As Object
   Set Items = Application.ActiveExplorer.CurrentFolder.Items
   Set Item = Items.Add("ipm.note.name")
   Item.Display
 End Sub

 

Open a web page

Use this script if you want to open a web page using a button on Outlook's ribbon.

Sub OpenWebpage()
CreateObject("WScript.Shell").Run ("https://www.slipstick.com/")
End Sub

More fun with hyperlinks:
Create a Hyperlink on an Outlook Custom Form
Open All Hyperlinks in an Outlook Email Message

 

Add a button to the ribbon tutorial

This tutorial shows you how to add a button to one of Outlook 2013's ribbon tabs. If you prefer to add them to the Quick Access Toolbar (QAT), the steps are the same but you'll start in File, Options, Quick Access Toolbar. Note: In Outlook 2010 you cannot add buttons to the ribbon but you can add buttons to the QAT.

  1. Select Macros from the Choose commands from menu
  2. Select the macro. Only Public macros that you can run manually will be listed here.
  3. Click Add to add it to the QAT (or ribbon)
  4. To change the icon and display name, click Modify.

After you add a macro the ribbon, you cannot move the macro or change the macro or module name. If you do, you'll need to recreate the macro.

add macros to the qat or ribbon

 

Select a template from File Open dialog

The macro will open the File Explorer dialog to a specific folder for you to choose a template. This macro uses late binding, so you won't need to set a reference to the Word object model to use it.

Sub ShowOpenDialog()
'Display the Open dialog box
Dim wdApp As Object ' Word.Application
Dim dlgOpen As Object ' FileDialog
Dim strFile As String

'Set wdApp = New Word.Application
Set wdApp = CreateObject("Word.Application")
 Dim vrtSelectedItem As Variant
    'Set the dialog box type to Open
    Set dlgOpen = wdApp.FileDialog(msoFileDialogFilePicker) 

'Show only Outlook templates in the specific folder path
    With dlgOpen
         .InitialFileName = "D:\Documents\Slipstick Templates\"
        .Filters.Add "Outlook Template", "*.oft"

  If .Show = -1 Then
      strFile = .SelectedItems(1)
  
    Set newItem = Application.CreateItemFromTemplate(strFile)
      newItem.Display
    Else
    ' user clicked cancel 
    End If

    End With

End Sub

 

Create a Hyperlink button

This works in Outlook 2007 and older versions as well as all Office applications that have the Assign Hyperlink option on customized buttons. You can hyperlink to any file, although programs (*.exe) may be restricted for security reasons.

Assign a hyperlink to a button

You can use any button in the Customize dialog (select a category on the left to see additional buttons). If you want to create a menu button, there is a blank one in the New Menu category.

  1. Right click on the toolbar area.
  2. Choose Customize
  3. From the Commands tab, drag a button (any button) to the Menu bar or a Toolbar
  4. Right click on the button to expand the customize menu
  5. Click Assign Hyperlink then Open and select the file you want to open.

Video Tutorial

In Outlook 2007's main interface and in Outlook 2003 and older, you'll add a button to the toolbar as shown in the following video.

[wpvideo Envs3ce2 w=580]

 

Disable the hyperlink warning

When you open templates or files using a hyperlink button or from Outlook's Shortcut navigation pane, you'll receive an unsafe hyperlink warning. You can disable the warning by editing the registry.

Unsafe file warning

You may also receive the file open or save dialog when using a hyperlink button or shortcut. To disable this dialog when the "Always ask" field is grayed out, run Outlook as administrator. The "always ask" checkbox should be clickable. If not, you'll need to edit the registry for each file type. See Disable "Always ask before opening" dialog for more information.

Open or Save dialog

The solution

Add a registry value to disable the warning dialog.

Open the registry editor and browse to the following registry subkey for
Outlook 2016 / 2019 / 365:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Security

Outlook 2013:
HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Security

Outlook 2010:
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Security

Outlook 2007:
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\Security

Note: If the Security key does not exist in your registry, you'll need to create it too.

Right click on Security key and choose New, DWORD. Type (or paste)

DisableHyperlinkWarning as the Value name then double click on it. Enter 1 as the Value data to disable the warning. Delete the key or use a value of 0 to enable the warning.

Change the registry value

Group policy keys for administrators

Administrators will add the DisableHyperlinkWarning DWORD to the Policy key instead:

Outlook 2016 / 2019 / 365:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Common\Security

Outlook 2013:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\15.0\Common\Security

Outlook 2010:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\14.0\Common\Security

Outlook 2007:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Common\Security

Do It For Me

If you don't want to edit the registry yourself, you can download and run the following registry key for your version of Outlook.

Outlook 2016Outlook 2013Outlook 2010
Outlook 2007

How to use the macros on this page

First: You need to have macro security set to the lowest setting, Enable all macros during testing. The macros will not work using the options that disable all macros or unsigned macros. You could choose the option to warn about macros and accept it each time you restart Outlook, however, because it's somewhat hard to sneak macros into Outlook (unlike in Word and Excel), allowing all macros is safe, especially during the testing phase. You can sign the macro when it is finished and change the security to allow signed macros.

To check your macro security in Outlook 2010 and newer, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, look at Tools, Macro Security.

After you test the macro and see that it works, you can either leave macro security set to low or sign the macro.

Open the VBA Editor by pressing Alt+F11 on your keyboard.

To put the code in a module:

  1. Right click on Project1 and choose Insert > Module
  2. Copy and paste the macro into the new module.

More information as well as screenshots are at How to use the VBA Editor

More Information

Outlook 2010: Open custom form via your own ribbon (vboffice.net)
Opening a Saved Outlook Template (.oft file) in Office 2003 and 2007 Whitepaper by Helen Feddema
How to enable or to disable hyperlink warning messages in 2007 Office programs and in Office 2010 programs (MSKB)
How to Open Outlook Templates and Files using Toolbar Buttons was last modified: May 20th, 2025 by Diane Poremsky
Post Views: 74

Related Posts:

  • Do you send a lot of messages to one person or group and want to make
    How to create preaddressed messages
  • How to add shortcuts to applications on the Shortcut Bar
  • Using Voting Buttons in Email
  • Disable the Unsafe Hyperlink Warning when Opening Attachments

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Comments

  1. Michael says

    February 9, 2023 at 9:31 am

    MS broke the pin to outlook in Windows 11 do you know of a way to get this feature back, or some kind of reasonable workaround?

    Reply
  2. Phillip says

    July 24, 2022 at 10:10 pm

    Hi Diane,

    I was wondering how I would go about exporting the toolbar and importing to multiple computers. Whenever I try this it shows on the toolbar, just in a different spot

    Reply
    • Diane Poremsky says

      July 26, 2022 at 12:21 am

      File > Options > Customize ribbon - you need to do this with each outlook item you change. Or copy the customUI files - they are at C:\Users\%username%\AppData\Local\Microsoft\Office

      Reply
  3. Yohann says

    October 12, 2021 at 3:44 am

    Hello Diane, thank you for all these resources. I use FileDialog(msoFileDialogFolderPicker) to open the Excel dialog box in order to select a folder; yet, sometimes the dialog box opens in the background. It is quite boring because the procedure seems locked while it is just due to the dialog box we can't see. Do you know if there is a way to open the dialog box in the foreground please? Thank you. Yohann

    Reply
    • Diane Poremsky says

      October 12, 2021 at 11:42 am

      As far as I know, there is not an option to force it to the front but try adding .show after you open (if you aren't already using it) This would be in addition to the if liner, if using that.

        With dlgOpen
           .InitialFileName = "D:\Documents\Slipstick Templates\"
          .Filters.Add "Outlook Template", "*.oft"

      .show

       If .Show = -1 Then

      Reply
      • Yohann says

        October 13, 2021 at 3:27 am

        Thank you Diane for your reply. You me be interested by this one: excel - FilePicker in Macro opens dialogbox in background - Stack Overflow

  4. Ed Nowakowski says

    May 5, 2021 at 6:47 pm

    I'm trying build a simple macro to open an email template using your code above but I can't ever get it to run properly as it gives me a run-time error message saying it can't open xxx. I've tried this on multiple machines with the same issue. I'm sure I'm missing something.

    Reply
    • Diane Poremsky says

      October 12, 2021 at 11:17 am

      Is the path correct?
      Is the file stored in a cloud storage folder? (They may or may not open from the cloud - I had to move my templates into a local folder).

      Reply
  5. Bill Mosca says

    November 23, 2020 at 11:57 am

    Diane - Thanks for a very simple solution. I used to be an Access developer so I appreciate your methods here.

    Reply
  6. Scott says

    October 22, 2020 at 11:41 am

    This used to work for me but I have recently updated Outlook and it is now saying that I don't have the permission to open my template via the Macor/Button... any suggestions??

    Reply
    • Diane Poremsky says

      November 23, 2020 at 11:59 am

      Where is the template stored? Did you just install regular updates or upgrade to a new version of outlook?

      Reply
  7. Mateus says

    February 10, 2020 at 2:01 pm

    Hello, Diane!

    We created a new template with customizable fields and published it in a public folder of our organization (created via Exchange). So now everyone can access it via the "Choose Form" dialog, but, as you said in this post, it's a little bit too much steps for some people.

    I've been trying some of those solutions, but I'm having trouble making it all work.

    What is your suggestion to make a shortcut to this template and replicate to all of our employees' Outlook?

    Thanks in advance!

    Reply
  8. Troy says

    November 16, 2017 at 9:59 am

    I've looked for this so long - thanks a ton! Now trying to expand a bit to include multiple templates/macros but not following how to add. I'm able to duplicate the code changing the path to the macro I want to use and append it in the VB editor under my project. I'm then able to add that to the ribbon. But when I go to click on the 2nd macro template it doesn't do anything. The first one continues to work however. Suggestions?

    Snippet of my VB Code:

    Sub MakeItemScheduling()
    Set newItem = Application.CreateItemFromTemplate("C:pathto1st.oft")
    newItem.Display
    Set newItem = Nothing
    End Sub
    Sub MakeItemProjectCompletion()
    Set newItem = Application.CreateItemFromTemplate("C:pathto2nd.oft")
    newItem.Display
    Set newItem = Nothing
    End Sub

    Reply
    • Diane Poremsky says

      November 16, 2017 at 12:11 pm

      As long as the path it correct, it should work. Add msgbox "MakeItemProjectCompletion" right before set newitem and see if the dialog box comes up. if so, copy the template path and paste it into windows explorer - does the template open?

      Reply
      • Troy says

        November 16, 2017 at 1:52 pm

        Hi Diane - well I went back and re-read your original instructions and was able to get it working with the following:

        Dim template As String

        Sub OpenTemplate1()
        template = "C:\Users\Troy\AppData\Roaming\Microsoft\Templates\SchedulingTemplate.oft"
        MakeItem
        End Sub

        Sub OpenTemplate2()
        template = "C:\Users\Troy\AppData\Roaming\Microsoft\Templates\ProjectCompletion.oft"
        MakeItem
        End Sub

        Private Sub MakeItem()
        Set newItem = Application.CreateItemFromTemplate(template)
        newItem.Display
        Set newItem = Nothing
        End Sub

        Thanks for the quick reply and appreciate you sharing these.

        I would also add I've taken this a step further to use the self-signed Cert in Office and digitally signing it to the VB project which makes the pop-ups go away as the macros are now trusted. https://www.groovypost.com/howto/howto/office-2010-outlook-self-signed-digital-certificate/

        Thanks!!!

      • Diane Poremsky says

        November 16, 2017 at 2:56 pm

        you don't want to sign the macros until after you are 100% sure its working - each time you edit a macro, you need to remove and re-sign the macro. (My instructions are at Using SelfCert to sign a macro

  9. Kylie says

    June 19, 2017 at 9:16 pm

    I might be missing something, but I have a simple workaround. Open a blank custom template, such as a task template, with the name of the template in the subject field for easy identification. Save it. It will appear in the task list. Copy and paste it multiple times and you will have plenty of blank templates ready to edit with a single click.

    Reply
    • Diane Poremsky says

      June 19, 2017 at 11:18 pm

      That's fine if you don't mind having blank items hanging around. You could also copy the template from the file system and paste it in an Outlook folder - when you open it, it creates a new item.

      Reply
  10. Dave says

    June 5, 2017 at 2:05 pm

    Is there a simple way to integrate the FROM field into the macro? I would like
    to open my .oft file using a different FROM email address that I have Send on Behalf Of rights to (not Send As). Thanks.

    Sub MakeItem()
    Set newItem = Application.CreateItemFromTemplate("c:pathtemplate.oft")
    newItem.Display
    Set newItem = Nothing
    End Sub

    Reply
    • Diane Poremsky says

      June 19, 2017 at 11:30 pm

      Yes - before newitem.display, you set the account. https://www.slipstick.com/developer/send-using-default-or-specific-account/ shows how - for send on behalf of, use newitem.SentOnBehalfOfName = "alias@domain.com"

      Reply
  11. Heather says

    February 21, 2017 at 5:38 pm

    Thank you for this, it worked like a charm. However, the new group (which I named Templates) is huge. How can I make the icons smaller/compact? The icons (macro icons) appear to be full-sized, and the full template name is displayed. I'd love it if I could get them simply with abbreviated template names and/or smaller icons. Is there a way to set/limit the size of my new group? Thank you!

    Reply
    • Diane Poremsky says

      February 27, 2017 at 1:26 am

      After adding the buttons to the ribbon, you can rename them and change the icon - click the Rename button. The size is automatic - I'm not sure how outlook decides to go small but how crowded the ribbon is is one cause. The first button in a group might be large, additional ones small. Not sure if display name has an effect - but the ones i renamed with longer names seen to be small (when the ribbon is crowded.).

      Reply
  12. Janine White says

    January 25, 2017 at 2:29 pm

    This is exactly what I was looking for. Thank you!

    One thing that it would be helpful to include is that the macros will be visible when Macros is selected in the Customize QAT dropdown list. It's simple, but it took me a little while to figure out how to add them once I entered the code.

    Reply
  13. Christine_A says

    December 28, 2016 at 4:51 pm

    I came up with an alternate solution that doesn't involve any macros. Using the Shortcuts icon at the bottom of Outlook, I created shortcuts to my favorite templates by dragging them from their folder into the Shortcuts group, and now I can access them all with just one click. You can also add the Shortcuts icon to your ribbon at the top by customizing the ribbon, creating a new ribbon group, and adding Shortcuts from All Commands to it if desired. It also works if you want to create a folder in your Documents for all your Outlook templates and then just drag the whole folder itself into the Shortcuts group. I don't know if this helps anyone, but to me, it's easier than creating macros, although I do know how to do those too.

    Reply
    • Diane Poremsky says

      January 25, 2017 at 5:15 pm

      It's not really easier - unless your company doesn't allow macros, then it's your only option. It doesn't work with custom forms and macros can pick up content from selected items to customize the message. For example, if you are using templates to send replies, you can get the name and address from the selected message or select a contact and open the message addressed to the contact.

      Reply
  14. Tiago says

    December 2, 2016 at 5:36 am

    Hello, thank you for this explanation.

    Does this work with custom forms for calendar events too? I have several of these forms published in my Personal Forms Library, but I can't find the path to them. Can you help me? Thank you.

    Reply
    • Diane Poremsky says

      January 25, 2017 at 5:09 pm

      Yes, it will. You'll use the version lower on the page that works for custom forms - change this line to use the IPM.Appointment.customname you are using:
      Set Item = Items.Add("ipm.note.name")

      Reply
  15. Johnny says

    June 22, 2016 at 4:15 pm

    Appled the Multiple Template VBA , only the first one opens the second one does not: Run time error 2147287038 (800300002) Cannot open file , the file is in the same folder as the first one. C:\Users\Username\AppData\Roaming\Microsoft\Templates\2nd.oft. ...help???

    Reply
    • Diane Poremsky says

      June 24, 2016 at 6:06 pm

      The template opens ok if you paste the path into the address bar of windows explorer? Try changing the filename to something with all lower case letters and see if it works. Also check the file permissions.

      Reply
  16. Adonal says

    March 9, 2016 at 8:02 pm

    Thanks for the quick tips, it just seems like I should be able to embed this newly created template into the quick steps menu. All I really want to do is quickly open templates from our shared network drive when creating emails for routine events. Our office has about 10 templates we use regularly to initiate our process, If I save them as regular quick steps I lose all my formatting and hyperlinks. Creating the macro to have the templates accessible is great but the 10 templates would take up a lot of room on the ribbon. Anyway I can format the newly created group to look more like the quicksteps or do I have no control over the appearance other than the icon I chose? Thanks.

    Reply
    • Christine_A says

      December 30, 2016 at 9:07 am

      You can use the Shortcuts icon at the bottom of Outlook to drag the templates from your shared drive and create shortcuts out of them without all of the hassle of having to create macros. They'll always be readily accessible in your Outlook shortcuts that way.

      Reply
      • Diane Poremsky says

        January 25, 2017 at 4:45 pm

        That works for some templates, but not all (it depends on what is in the custom form), and not for custom forms. Plus, unless you work in the shortcuts bar, you'll need to switch folders to use them. Adding them to the shortcuts bar can be a hassle too, especially if you need to reset the bar. The big advantage is you can do things like pick up addresses or other data from selected items - which could save you some additional steps.

        (You can also create a folder in your mailbox and drag templates to it.)

  17. Michael says

    December 31, 2015 at 4:15 pm

    I was able to get the macro to work using multiple templates. Thanks a lot for that!
    I was wondering if it would be possible to have the macro take whatever email address I have in my clipboard and paste it into the To: address when I click the Template button?

    Thanks again!

    Reply
    • Diane Poremsky says

      December 31, 2015 at 4:23 pm

      Sure. See https://www.slipstick.com/developer/code-samples/paste-clipboard-contents-vba/ for an example. Add the 4 lines of code above the first screenshot to your macro (before the template loads) and add a reference to the forms library then add this after the template loads & before display -
      newItem.to = strPaste

      Reply
      • Michael says

        February 14, 2016 at 4:03 pm

        Tried something this, get no errors but the emails from clipboard aren't pasted into the To:

        Dim template As String

        Sub Followup()
        Dim DataObj As MSForms.DataObject
        Set DataObj = New MSForms.DataObject
        DataObj.GetFromClipboard

        strPaste = DataObj.GetText(1)
        template = "C:\Templates\1.oft"
        MakeItem

        End Sub

        Sub Retention()
        Dim DataObj As MSForms.DataObject
        Set DataObj = New MSForms.DataObject
        DataObj.GetFromClipboard

        strPaste = DataObj.GetText(1)
        template = "C:\Templates\2.oft"
        MakeItem

        End Sub

        Private Sub MakeItem()
        Set newItem = Application.CreateItemFromTemplate(template)
        newItem.To = strPaste
        newItem.Display
        Set newItem = Nothing
        End Sub

      • Diane Poremsky says

        February 14, 2016 at 9:34 pm

        Try adding Dim strPaste As String at the top, with the dim template line.

  18. Ofer says

    December 7, 2015 at 2:27 am

    10X
    Very Usefully

    Reply
  19. Dylan says

    December 3, 2015 at 4:48 pm

    Hi, I'm trying to use the "Open a published form" code above to open a custom meeting invite form in Outlook 2013, but when I try to send the meeting I get this error:

    "This meeting is not in the calendar folder for this account. responses will not be tallied."

    The form works as expected when I use the "Choose form" dialogue, any ideas?

    Reply
    • Diane Poremsky says

      December 3, 2015 at 4:58 pm

      It's these lines - they tell outlook to use the current folder, not the default folder.
      Set Items = Application.ActiveExplorer.CurrentFolder.Items
      Set Item = Items.Add("ipm.note.name")

      change the line that sets the folder to
      Set Items = Session.GetDefaultFolder(olFolderCalendar).Items

      Reply
  20. Philomeno Cappador says

    September 21, 2015 at 3:05 pm

    I have some vba code to bring the Stationery Picker that I started since Outlook 97, I have modified it through several versions all the way up to 2010, however, now I am at 2013 and it stopped working, I get an Error 91: Object variable with block variable not set.

    Specifically this piece of code is the culprit in 2013:

    set objCB=Application.ActiveExplorer.Commandars.FindControl(, 5611)

    This used to bring up the Stationery Picker menu.

    Your help is greatly appreciated.

    Reply
    • Diane Poremsky says

      September 21, 2015 at 5:56 pm

      Outlook 2013 (and up) doesn't support command bar objects. Use the IRibbonExtensibility interface in an Outlook 2013 add-in instead of command bars. Yeah, i know, this probably won't help you because of how you were using it (plus I think it's a bit more complicated). More info: https://msdn.microsoft.com/en-us/library/office/ff868522.aspx

      Reply
  21. JimmB says

    August 8, 2015 at 3:38 pm

    I'm using Outlook 2007 on Windows 7. I've read about the CommandBars IDs and I've searched all over the web, but can't find the ID for this window.

    Reply
  22. JimmB says

    August 7, 2015 at 3:29 pm

    I've done that.

    It occurs to me, can a macro initiate keystrokes in a dialog box? 4 down arrow keystrokes, followed by 3 tabs would do it.

    Reply
    • Diane Poremsky says

      August 7, 2015 at 4:13 pm

      That would be Sendkeys and it would only work if we can open the dialog using VBA.

      Reply
    • Diane Poremsky says

      August 7, 2015 at 6:55 pm

      okay, heard back from my developer friends and they said no, you can't bring up the form chooser using VBA. What version of Outlook do you use? You might be able to get it open using the commandbars ID, then could use sendkeys to select the templates from the dropdown, but that is really messy. There are some windows macro apps - like autoit that might be able to do it.

      Reply
  23. JimmB says

    August 7, 2015 at 2:36 pm

    I would like to have a macro that just takes me to the Choose Form... User Templates in File System dialog box since I have a lot of templates -- too many to create a macro for each one. This would save a couple of mouse clicks each time.

    Can anyone tell me if that code is feasible, and give me an idea where to find it? I have spent hours searching and not found the answer yet.

    Reply
    • Diane Poremsky says

      August 7, 2015 at 2:45 pm

      Well, you can get close by customizing the ribbon or QAT - just add the choose form command to either. It starts in the Standard forms library, so you'd need to select the user templates folder, but it will save a few steps. I'll check on a macro, but I don't think it's possible.

      Reply
  24. Phil Reinemann says

    July 6, 2015 at 9:51 am

    For Windows 7 (and later?) MS makes available a "problem state recorder". Open a command prompt and type psr at the prompt and hit Enter/return.
    Start a recording. Pause or stop along the way.

    It captures a lot of stuff that happens. I've used it to document how-to for my users.

    Note that if it takes more than 25 steps it looses the earlier images (FIFO), but there is a setting that allows that number to be changed.

    I haven't tried it for macros as running a macro is likey one step, but stepping through the macro may work.

    Reply
  25. KenLV says

    July 2, 2015 at 11:09 pm

    I don't see a Tools menu in Outlook 2016. But I had set it from the Developer Ribbon and it WAS set for "Notifications for digitally signed..." I assume that's the only place/same place?

    However, even set that way it WAS working in Outlook. Then, when it wasn't working in the VBA editor (but still working in Outlook) I switched it to "Enable all...".

    I had exited Outlook and rebooted and restarted Outlook and it was still not working in either one. Got no message/warning in Outlook but did get the above error in the editor.

    Now...

    I just - in Outlook - tried again and initially got an error message that I accidentally got rid of on one; then I ran the others... no problem and then reran the first and it too ran!

    I'm telling you, this thing is possessed.

    I tried to RUN in editor and these "run" individually - and if I run this part:

    Sub MakeItem()
    Set newItem = Application.CreateItemFromTemplate(template)
    newItem.Display
    Set newItem = Nothing
    End Sub

    it opens whichever of the other two was last run - Monday or Tuesday.

    However, I still can NOT "Step in". It just gives the error "bing" tone but no error message and nothing runs.

    I wish I had whatever tool you are using to demo them so I could show you I'm not insane. "/

    Ken

    Reply
    • Diane Poremsky says

      July 3, 2015 at 9:25 am

      I use Camtasia to record the screen, although there are other utilities that can do it too.

      >> I'm telling you, this thing is possessed.
      LOL That's Outlook for you. No one is going to argue against that.

      Are you still getting the error on the second macro? As long as both are working, create buttons on the ribbon for them and go on. If #2 is still failing, select it on the hard drive, Ctrl+C to copy then Ctrl+V to paste it. Rename the copy then use the copy in the macro. The error went away when I tried the copy and then the original one worked. See, Outlook is possessed. :)

      I fixed the Tools, Trust center part. For some reason I was thinking you had 2007.

      Reply
  26. Ken says

    July 2, 2015 at 2:01 am

    Diane, first, thanks for these great tutorials. Having just moved from Win 7 and Office 2007 to Win 8.1/10 and Office 2016, they are helping me keep what little hair I have left. But now on to my problem...

    In Outlook 2007 I had, as you have shown here, created a toolbar menu item (E&Mail Templates) and hyperlinks to my 2 dozen or so templates that I use on a daily basis. Each with a shortcut key (by putting an ampersand in the name somewhere. For example: Order &Monday, Order &Tuesday, &Bounced Back, etc... ).

    So opening a specific template was as simple as "ALT+M, B" to open my "Bounce" template.

    I found quickly that you can't set up hyperlinks to templates in 2016. :(

    This is my first time using VBA but I set up several macros as you laid out. A couple of quick questions though...

    What was your second macro supposed to do? The one that says:
    "If you want to use a macro to open different templates, assign the template path to a variable and pass the variable to the macro, like this:"

    Because when I created it, all it did was open the first template I had assigned in it (I had two total for testing). Though there are two separate macros listed for them as well. Here's exactly how I entered it:

    Dim template As String

    Sub OrderMonday()
    template = "C:\Users\Ken\AppData\Roaming\Microsoft\Templates\Order day on Monday!!.oft"
    MakeItem
    End Sub

    Sub OrderTuesday()
    template = "C:\Users\Ken\AppData\Roaming\Microsoft\Templates\Order day on Tuesday!!.oft"
    MakeItem
    End Sub

    Sub MakeItem()
    Set newItem = Application.CreateItemFromTemplate(template)
    newItem.Display
    Set newItem = Nothing
    End Sub

    I now have three new macros:

    Project1.OrderMonday
    Project1.OrderTuesday
    Project1.MakeItem

    Monday opens the Monday template.
    Tuesday opens the Tuesday template.
    MakeItem opens the Monday template.

    BTW, how do I change the naming so they all don't have "Project1" at the beginning? I didn't see any "save as" type file option.

    Also, how do you modify the ALT shortcut keys of new/existing Ribbon items?

    Thanks again, Ken

    Reply
    • Diane Poremsky says

      July 2, 2015 at 9:01 am

      It looks correct. Step through the macros in the VBA editor - do they work correctly? Stop when the yellow line is on Set newItem = Application.CreateItemFromTemplate(template) and hover over template, is the correct template path showing?

      Project1: You can't change it in the macro name in the macro picker. Are you making them into ribbon buttons? You can rename the buttons - in the customize ribbon dialog, choose Rename after adding it to the ribbon.

      Reply
    • Diane Poremsky says

      July 2, 2015 at 9:02 am

      Assigning or changing shortcuts: You can't. If you add to the QAT the shortcuts are shorter.

      Reply
    • Ken says

      July 2, 2015 at 2:58 pm

      Sorry, like I said, first time doing this...I don't know what you mean "Step through the macros in the VBA editor ".

      I created this macro by "insert[ing] a module" - it seemed to be the only way I could create something new. (Like I said, I really have no idea what I'm doing here - clearly.) I saved it and added it them to the ribbon (sorry, I can't add a screenshot or I would).

      To see if this is what you wanted me to do, in the editor I just used the Run command and it brought up macro dialogue box where I could choose the macro and run (blue highlight line, not yellow so I think that this is not where you want me to be but...) it then it says "the macros in this project are disabled...refer to host application to determine how to enable..." (but I CAN run them as Ribbon items).

      Reply
      • Diane Poremsky says

        July 2, 2015 at 3:39 pm

        Hmmm.

        it says "the macros in this project are disabled...refer to host application to determine how to enable..." (but I CAN run them as Ribbon items).

        If the macros are disabled, they should be disabled everywhere, not just in the editor.

        I hadn't had a chance to test my macros - and got the same error on the second one. Will see what i can figure out. It definitely doesn't like the file path.

      • Diane Poremsky says

        July 2, 2015 at 3:56 pm

        That was weird - I got the error message about the second template right after I created both test templates but after copying the templates and running tests, it opened. I'm guessing Outlook had a hold on it for some reason.

        you would use F8 or the Step Into button on the Debug Toolbar to walk through the macro so that you can check variables on line or see where it stops.

        I have a video example here - https://drive.google.com/file/d/0B22iPSInt7uxMVhsa0tJTFZ4TlE

    • KenLV says

      July 2, 2015 at 4:37 pm

      Can't Step Into either, same "macros disabled" error message.

      Reply
    • KenLV says

      July 2, 2015 at 4:40 pm

      BTW, I'm still unclear what exactly this macros was supposed to do. I thought maybe give the choice of which of the templates but I really don't know since I can't get it to run correctly.

      Reply
      • Diane Poremsky says

        July 2, 2015 at 5:56 pm

        It won't give you a choice (in a dialog where you'd pick between them) but if you create buttons for the two macros, you'll click a button to open the template.
        Template buttons

    • KenLV says

      July 2, 2015 at 4:46 pm

      Also, in that error message it says "The Please refer to the online documentation or host application to determine hot to enable macros."

      My options are then "OK" or "Help"

      Help brings me to a dead link in the developer network leaving me stuck: https://msdn.microsoft.com/Areas/Epx/Content/500.aspx?aspxerrorpath=/query/dev11.query

      Reply
    • KenLV says

      July 2, 2015 at 4:49 pm

      Argh... now the macros have stopped working in Outlook itself.

      Where'd I put my Outlook 2007 install disk!!! :(

      Reply
      • Diane Poremsky says

        July 2, 2015 at 5:47 pm

        Go into Tools, Trust Center (older versions) or File, Options, Trust Center (2010 and newer) and verify that the macro security is set to low (allow all macros). If so, set it to high and apply, then set it back to allow all macros.

    • KenLV says

      July 2, 2015 at 11:15 pm

      Also, maybe I should take this to the forums as this is getting quite long/complicated and I don't see it ending soon. Plus, I can attach screenshots there.

      Reply
      • Diane Poremsky says

        July 3, 2015 at 11:09 am

        Yes, longer problems are usually better in the forums - plus maybe one of the visitors will see something I overlooked. (In an instance a couple of weeks ago, i didn't notice a missing "s" but someone else did.)

  27. Pete says

    June 5, 2015 at 4:42 pm

    how would you dimension the newItem variable?

    Reply
    • Diane Poremsky says

      June 5, 2015 at 6:43 pm

      you can use
      dim newitem as outlook.mailitem
      or just
      dim newitem

      Reply
  28. erikofmke says

    May 15, 2015 at 11:08 am

    Is there any way to get a template to open with an alternate "From" listing. I have done the mods for changing my "Send on Behalf" to a "Send As" for my departments shared mailbox. I have added the template to the tool bar. However, in the heat of battle the changing of the "From" can be overlooked.

    Reply
    • Diane Poremsky says

      May 15, 2015 at 11:56 am

      If it was it's own account, you could set it in the template.... but since you are using a toolbar button to open the template, you can set it as it opens.

      Replace newitem.display with

      With newitem
      .SentOnBehalfOfName = "sharedalias@domain.com"
      .Display
      End With

      Reply
    • erikofmke says

      May 15, 2015 at 1:53 pm

      Perfecto! Thanks Again!

      Reply
  29. Phil Reinemann says

    April 1, 2015 at 10:26 am

    What is the "Set newItem = Nothing" for?
    Was it copied from other examples and really should be "Set newItem1 = Nothing" and "Set newItem2 = Nothing"?
    (And, for my own edification, would "Set newItem1 = newItem2 = Nothing" work?)

    Reply
    • Diane Poremsky says

      April 1, 2015 at 1:10 pm

      The set = nothing line clears the object from memory before the macro exits. In this combined macro it would be
      Set newItem1 = Nothing
      Set newItem2 = Nothing

      RE: would "Set newItem1 = newItem2 = Nothing" work?
      You could try it, but I don't think it will work in VBA.

      Reply
  30. David Styles says

    April 1, 2015 at 4:43 am

    Hi Diane,
    Works great, Thank you.
    Just also want to say I have learnt more about Outlook's capabilities in the last couple of months from your website than I have in all the years I have been using Outlook. You explain things so clearly and concisely. Keep up the great work and thanks again.

    Reply
  31. David Styles says

    March 6, 2015 at 3:54 am

    Thank you for your very prompt reply. If I browse to the folder where both templates are stored they will both open independently. I was hoping that by launching the macro both templates would open together so the user would be prompted to complete both. One is to place an appointment in a diary and the other to send a separate e-mail confirmation to a client.

    Reply
    • Diane Poremsky says

      April 1, 2015 at 1:29 am

      Sub MakeItem()
      template1 = ("\\HF-SBS\Company\DiaryApp.oft")
      template2 = ("\\HF-SBS\Company\AppConf.oft")
      Set newItem1 = Application.CreateItemFromTemplate(template1)
      Set newItem2 = Application.CreateItemFromTemplate(template2)

      newItem1.Display
      newItem2.Display

      Set newItem = Nothing
      End Sub

      Reply
  32. David Styles says

    March 5, 2015 at 8:50 am

    Hi Diane, I have found your ideas a real help and has given me a good introduction to the real power of Outlook. I am trying to set a macro to open two templates and have followed your guidelines but it only opens 1 template. Can you please guide me as to where I am going wrong. My macro looks like this:-

    Dim template As String

    Sub OpenTemplate1()
    template = ("\\HF-SBS\Company\DiaryApp.oft")
    MakeItem
    End Sub

    Sub OpenTemplate2()
    template = ("\\HF-SBS\Company\AppConf.oft")
    MakeItem
    End Sub

    Sub MakeItem()
    Set newItem = Application.CreateItemFromTemplate(template)
    newItem.Display
    Set newItem = Nothing
    End Sub

    Just so you know the templates are stored on our Small Busienss server.
    Thanks

    Reply
    • Diane Poremsky says

      March 5, 2015 at 4:14 pm

      The code looks correct. What happens when you use the macro for the second template? Does that template open correctly if you browse to the folder and double click on it?

      Reply
  33. Jack M. O'Leary says

    January 13, 2015 at 8:49 am

    Diane,
    I took one more crack at it, and came up with this version that seems to work.
    Jack

    Public Sub OpenPublishedForm()
    Dim Items As Outlook.Items
    Dim Item As Object
    WindRaised = Application.ActiveExplorer.CurrentFolder
    If WindRaised = "Calendar" Then
    StartDa = Application.ActiveExplorer.CurrentView.SelectedStartTime
    EndDa = Application.ActiveExplorer.CurrentView.SelectedEndTime
    Set Items = Application.ActiveExplorer.CurrentFolder.Items
    Set Item = Items.Add("ipm.Appointment.VacationEvent")
    Item.Start = StartDa
    Item.End = EndDa
    Item.Display
    Else
    MsgBox ("This Action cannot be executed unless you are viewing your calendar")
    End If
    End Sub

    Reply
    • Diane Poremsky says

      January 13, 2015 at 9:00 am

      Cool. Thanks for sharing.

      Reply
  34. Jack M. O'Leary says

    January 12, 2015 at 8:21 am

    Thanks for your thorough How to. It was very helpful to me in getting an older version custom appointment form into Office365. One final glitch is that my QAT button / macro code to open the published form doesn't inherit the active date chosen on the calendar so behaves differently than opening the form manually. Jack

    Reply
    • Diane Poremsky says

      January 13, 2015 at 1:05 am

      Yeah, that is a know issue - I think you need to use vba to use the selected date but I don't have any code samples that show how to do that.

      Reply
  35. Sam Stinger says

    January 6, 2015 at 10:12 am

    HI Diane,
    It works like charm. Thank you so much for sharing such a valuable piece of information. I would be grateful if there exits any way to integrate/package this code so that it can be executed on multiple machines rather going and touching the VBA editor on every workstation. Any help will mean a lot.
    Thanks

    Sam

    Reply
    • Diane Poremsky says

      January 13, 2015 at 9:01 am

      You'd need to compile it into an addin then distribute the addin using a logon script.

      Reply
  36. Antoni says

    October 9, 2014 at 6:16 am

    Thank you,
    Workes great.
    I'm looking for a way to integrate this into every user account in our organization.
    Can this be done using GPO or Citrix roaming profile?
    Thanks on advance.
    Antoni

    Reply
    • Diane Poremsky says

      October 30, 2014 at 9:50 pm

      Macros are hard to deploy as the user needs to 'touch' the vba editor to enable them. Sorry.

      Reply
  37. Jason says

    August 15, 2014 at 7:12 pm

    Thank you, thank you, thank you, thank you! I have dreaded the slow process of creating a new email from a template for so long, but today, thanks to you, I can now create new emails from specific templates with a single click!!

    Reply
  38. erikofmke says

    July 2, 2014 at 12:33 pm

    Very Nice. I've never done this before, so I was playing around and guessing on how to add another template. I had 2, so I figure out that I could clone the macro, change the MakeItem to 1 and 2 (or more) and that create separated Objects in the macro list.

    I used:

    Sub MakeItem1()
    Set newItem = Application.CreateItemFromTemplate("C:\Users\ErikC\AppData\Roaming\Microsoft\Templates\IT Dept.oft")
    newItem.Display
    Set newItem = Nothing

    End Sub

    Sub MakeItem2()
    Set newItem = Application.CreateItemFromTemplate("C:\Users\ErikC\AppData\Roaming\Microsoft\Templates\ITtoUS.oft")
    newItem.Display
    Set newItem = Nothing
    End Sub

    It worked awesome

    Reply
  39. Giulio B. says

    July 2, 2014 at 8:31 am

    Thank you very much for the very clear instructions.

    Is it possible to run the macro to apply the template to an answered message and not to a new message?

    Thank you again.

    Reply
    • Diane Poremsky says

      July 2, 2014 at 11:32 am

      Use it as the reply template? Yes, you can do that. You need to put a little more code into it - the macros at https://www.slipstick.com/developer/run-a-script-rule-autoreply-using-a-template/ are used for auto reply but kind of give you an idea of what you need to do for the body. You'd also need to work with the selection. Ah, what the heck :) I updated the page to include a macro that you run when needed.

      Reply
  40. Phil Reinemann says

    June 26, 2014 at 12:35 pm

    The W7 clipboard viewer (I have Excel open) shows the copied text without newlines too.

    Reply
    • Diane Poremsky says

      June 26, 2014 at 2:51 pm

      Thanks I'll see if i can repro because it should copy the code correctly. :(

      Reply
  41. Phil Reinemann says

    June 25, 2014 at 10:48 am

    I think it has something to do with the html code on this web page such that when copied the newlines or carriage returns or both aren't seen by the clipboard such that when pasted they append each line to the previous line.

    I've seen this on other code pages where to copy the code they provide a special "copy" button which takes the basic code, maybe minus formatting, and puts it in the clipboard.

    I tried copying the template1, template2 and MakeItem code into Notepad and they pasted as one long line, same as in the VB editor window. It's not a lot of code so I just put in the newlines where appropriate. (Except for one which I missed, so I got errors about object does not support this method for "newItem.DisplaySet" and even here, it didn't put in the newline between Display and Set.

    In any case when I fixed it all, the code works great. Again, thanks!

    Reply
    • Diane Poremsky says

      June 25, 2014 at 8:12 pm

      Which browser are you using? I'll try to repro the problem.

      Reply
  42. Phil Reinemann says

    June 24, 2014 at 11:45 am

    Works great. I have three forms I commonly use and I was going to ask before reading this how to make Choose Form go straight to User Templates in File System but this exceeds that need (at the cost of Outlook real estate). I can live with the space-loss (until I need many more buttons).

    I copied Diane's code and pasted into VBA, but it put it all three macros on one line. Is there a better way to paste the code?

    Reply
    • Diane Poremsky says

      June 24, 2014 at 11:47 pm

      That is how you are supposed to paste the code, but it should paste it on separate lines. With some other programs, I need to paste into Notepad then copy from notepad and paste in the app. That might work here. Sometimes if you double click on the code on these pages, it goes into a single line - if you copy it, it pastes as separate lines.

      Reply
  43. Daktus says

    May 22, 2014 at 6:31 am

    just use free software called "fingertips" for this and other links

    Reply
  44. Diane Poremsky says

    January 24, 2014 at 9:38 am

    I'm assuming you updated the path here - Set newItem = Application.CreateItemFromTemplate("c:\path\template.oft") - not doing so should trigger an error though.

    Reply
  45. david hilton says

    January 16, 2014 at 9:53 am

    I have it set at " Notifications for all macros"

    Reply
    • Diane Poremsky says

      January 16, 2014 at 5:45 pm

      And no errors when you click the button? Does the macro work if you try to run it from the VB editor?

      Reply
  46. david hilton says

    January 16, 2014 at 9:43 am

    I have gone back thru you how to and followed all the steps, amazing what happens when one does that. The button is now on the ribbon but when I press it nothing happens. What do I do know?
    The macro I copied from your site follows:
    Sub MakeItem()
    Set newItem = Application.CreateItemFromTemplate("c:\path\template.oft")
    newItem.Display
    Set newItem = Nothing
    End Sub

    Reply
    • Diane Poremsky says

      January 16, 2014 at 9:48 am

      Is macro security set to low? Check in File, Options, Trust Center, Macro Settings.

      Reply
  47. david hilton says

    January 15, 2014 at 11:23 pm

    Hi, when I click on the word macro unlike your video no choices appear in the left pane macro box for me to click onto to move to the right pane

    Reply
    • Diane Poremsky says

      January 16, 2014 at 12:18 am

      Which macro are you using? If the macro name line is like this: sub macroname (item as mailitem) the macro is called by other macros or is used in a run a script rule. It won't be in the list because you can't run it directly. If it's not that, post the macro here and i'll look at it.

      Reply
  48. david hilton says

    January 15, 2014 at 12:44 pm

    Sorry to be obtuse but I am a newbie, I ran the macro and it said it worked but when I go to select macros the choice is their but their is nothing below it to click on it to move it from the left panel to the right panel, could you please walk me thru it with a little more detail, I am sure I am missing something

    Reply
    • Diane Poremsky says

      January 15, 2014 at 10:15 pm

      Not a problem. I really should have a better video showing how to do it. See if this helps you see how to do it - https://www.youtube.com/watch?v=b576Ai26bvc

      Reply
  49. david hilton says

    January 15, 2014 at 6:00 am

    how do you do this for outlook 2013

    Reply
    • Diane Poremsky says

      January 15, 2014 at 8:29 am

      You need to use one of the macros and customize the toolbar - File, Options, Customize Ribbon. Select Macros from the dropdown and add the macro button to the ribbon.

      Reply
  50. Keith Larsen says

    January 14, 2014 at 4:39 pm

    Once a template is created and saved a file, use Windows Explorer to go to the tempalte folder. Select the template file(s) and drag and drop or copy them into any folder in Outlook. We create a folder called "-Forms" so it floats to the top where the template files are all quite easy to find and launch.

    Reply
    • Diane Poremsky says

      January 14, 2014 at 9:12 pm

      Yep, that is one of my favorite ways to use and store templates - the nice part is, when you use an exchange mailbox, they are always available. Even with a pst file, they are always backed up. :)

      Reply
  51. سام (@SamInMpls) says

    June 25, 2013 at 7:12 pm

    This was working perfectly until I upgraded to Outlook 2013. Now the buttons do nothing.

    Reply
    • Diane Poremsky says

      June 26, 2013 at 6:55 pm

      Do you have macro security set to low? That is the most common reason for macros to stop working and you don't receive errors.

      Reply
  52. Andy says

    April 29, 2013 at 1:06 pm

    Thanks very much! That worked perfectly.

    Reply
  53. Andy says

    April 29, 2013 at 1:06 pm

    To update re: Xobni - after disabling, running macro, relaunching Outlook and reenabling Xobni, the macro works fine.

    Reply
  54. Andy says

    April 29, 2013 at 7:41 am

    Another question: is it possible to have this work in a way such that the custom contact form record will always save to the contacts folder regardless of the folder from which I execute the macro? Thanks again, Andy

    Reply
    • Diane Poremsky says

      April 29, 2013 at 10:10 am

      You'd set the folder in this line:
      Set Items = Application.ActiveExplorer.CurrentFolder.Items

      assuming a subfolder of the default called shared
      Set Items = Session.GetDefaultFolder(olFolderContacts).Folders("Shared").Items

      See working vba non-default folders/ for more details

      Reply
  55. Andy says

    April 29, 2013 at 7:36 am

    Thank you - I set Macro Settings to "Enable all macros..." Still didn't work.

    On a whim I just looked at my COM Add-Ins wondering if any of them might be interfering. When I disabled Xobni, the macros worked.

    Now I have a different issue (macros versus Xobni) but at least I know that macros work.

    Thanks!

    Andy

    Reply
    • Diane Poremsky says

      April 29, 2013 at 10:12 am

      Thanks for the update. I had no idea Xonbi would affect it - I'll keep that in mind when other users complain that macros don't work.

      Reply
  56. Andy says

    April 29, 2013 at 7:10 am

    Hello Diane! I'm brand-spankin'-new to VBA and feel like I've jumped into the deep end of the pool (although I suspect I’m just splashing around in the kiddie pool still). I'm very excited to have found your site!

    I'm having difficulty with the macro to open a published form: (a) created a custom contact form to use with a specific set of contacts for a periodic mail merge; (b) published it to the "Personal Forms Library" and its message class is IPM.Contact.PIPECOI (it's named "PIPECOI"); (c) created a macro in "ThisOutlookSession" with the following:

    Public Sub OpenPublishedForm()
    Dim Items As Outlook.Items
    Dim Item As Object
    Set Items = Application.ActiveExplorer.CurrentFolder.Items
    Set Item = Items.Add("ipm.Contact.PIPECOI")
    Item.Display
    End Sub

    When I run the macro nothing happens. I also created a button on the ribbon for the macro, which doesn't work either. I’ve tried running the macro when in a variety of folders but get the same result. Because I’m so very new to this, I don’t know if I’ve missed something obvious or if there is another issue I need to run-down. I’ll be grateful for any ideas or suggestions - thanks very much!!

    Reply
    • Diane Poremsky says

      April 29, 2013 at 7:22 am

      Is macro security set to low? Once you are done testing, you can sign the macro and raise the security level if desired.

      Reply
  57. doug says

    April 1, 2013 at 1:42 pm

    yea.. 5 hours of googling this subject is unfruitful.. how do you tell outlook to TRUST the url location...."to protect your computer, licck only those hyperlinks fronm trusted soruces".
    Trust center (office word) can't handle an mms//myserver.video.wmv location.

    Reply
    • Diane Poremsky says

      April 2, 2013 at 8:26 pm

      Did you try adding it to IE's trusted lists- either the trusted or local intranet zone?

      Reply
  58. Joel Chertock says

    July 3, 2012 at 11:15 am

    Diane, thank you. The template link is not using the Outlook protocol you mention. That's a new one for me. Where can I find more on how to use this protocol to open a template file from a web link?

    Reply
    • Diane Poremsky says

      July 3, 2012 at 12:13 pm

      The outlook:// protocol? See Shortcuts and the Missing Outlook:// Protocol

      Reply
  59. Joel Chertock says

    June 11, 2012 at 10:58 am

    Hello, I'm adding a button in OL 2010 that I had working in OL2007 that opened a template file from a hyperlinked web page. OL2007 I could use a custom command that opened a hyperlink. OL2010, How do I do this? I can use a macro to link to a local file but how do I link to a file on a web page? The method above to createitemfromtemplate works only with local files. how can I get it to open files linked via a hyperlink?

    Reply
    • Diane Poremsky says

      June 11, 2012 at 11:58 am

      Is the template link using the outlook:// protocol? See https://www.slipstick.com/problems/outlook-2007-missing-outlook-protocol/ - you need to enable Outlook to use it.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 31 Issue 3

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Jetpack plugin with Stats module needs to be enabled.
  • Error Opening iCloud Appointments in Classic Outlook
  • Opt out of Microsoft 365 Companion Apps
  • Mail Templates in Outlook for Windows (and Web)
  • Urban legend: Microsoft Deletes Old Outlook.com Messages
  • Buttons in the New Message Notifications
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Error Opening iCloud Appointments in Classic Outlook

Opt out of Microsoft 365 Companion Apps

Mail Templates in Outlook for Windows (and Web)

Urban legend: Microsoft Deletes Old Outlook.com Messages

Buttons in the New Message Notifications

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2026 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.