CreateItemFromTemplate Method
Applies To
Application object.
Description
Creates a new Outlook item from an Outlook template (.oft) and returns it.
Syntax
expression.CreateItemFromTemplate(TemplatePath, InFolder)
expression An expression that returns an Application object.
TemplatePath Required String. The path and file name of the Outlook template for the new item.
InFolder Optional Variant. The folder in which the item is to be created. If this argument is omitted, the default folder for the item type will be used.
Example
This example creates and displays a new item created from the Outlook Mail template.
Set myOlApp = CreateObject("Outlook Application")
Set myItem = myOlApp.CreateItemFromTemplate _
("C:\Program Files\Microsoft Office\Templates\Outlook\Mail.oft")
myItem.Display