- Create a sample file in Outlook:
- 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.
- 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"
- 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.
- 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: - 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.
- Now that Macros are enabled, you can launch your template from the developer tab under Macros:
- 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:
- In the "Outlook Options" window that opens choose "Macros" from the list of command types to choose from:
- 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:
- Pick the most meaningful Icon you can find from the symbols given and click "OK" and then "OK" on Outlook Options" window.
- You will now see your Icon on the Quick Access Toolbar from the moment you open up Outlook:
- Click your Icon and you will see your template appear as a new email, waiting to be completed!
-Majorbacon
1 comment:
Great Article
IEEE Projects on Information Security
Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai
Post a Comment