Create Outlook Form and Open with Macro
I have some regular emails I send and I don’t like having to go to the Developer Tab, click Choose Form, Choose User Templates in File System, and then double-click the form in question. That’s way too many steps for this lazy user.
There is some very simple VBA code that will do this and then you can add the button to a Custom Tab. Here’s how.
Show Developer Tab
- Click the File Tab to bring up the Backstage View
- Click Options
- Click Customize Ribbon
- In the right column check Developer
- Keep Options open for next task
Create New Tab and Group
- In the right column click New Tab
- Click Rename
- Name the tab as desired (FORMS)
- Click the Group that was automatically created below the Tab
- Click Rename
- Rename as desired (REPORTS)
- Click the New Tab
- Use the Up and Down arrows to position the new Tab on the Ribbon as desired
- Click OK
Create the Form
- Open a New Email message
- Fill in the Static Content as desired
- Click the File Tab
- Click Save As
- Change the Save As Type to Outlook Template
- Name the file as desired (make note of the name as you will need this later)
- Copy the Address of this location from the Address Bar as you will need this shortly
Create the Macro
-
- Click the Developer Tab
- Click the Visual Basic Button
- Expand Project1
- Double click ThisOutlookSession
- Paste the Code Snippet below
Sub MakeItem()
Set newItem = Application.CreateItemFromTemplate(“c:pathtemplate.oft”)
newItem.Display
Set newItem = Nothing
End Sub
- Replace “c:pathtemplate.oft” with the file path and file name noted earlier. Keep .oft at the end.
- Click the Save Button
- Close VBA
Put the Macro on the new Tab
- Click the File Tab to bring up the Backstage View
- Click Options
- Click Customize Ribbon
- Expand your new Tab
- Click your new Group
- From the Choose commands from drop-down select Macros
- Select your new macro
- Click Add
- Click Rename and give the Macro a better name and image
- Click OK
Your new command is now available and functioning!
Thanks to Slipstick for the Code Snippet!
For these and other Application solutions check out our IT Support Site and our Training Site.