次の方法で共有


_Application.CreateItemFromTemplate Method

Creates a new Microsoft Outlook item from an Outlook template (.oft) and returns the new item.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Function CreateItemFromTemplate ( _
    TemplatePath As String, _
    InFolder As Object _
) As Object
'Usage
Dim instance As _Application
Dim TemplatePath As String
Dim InFolder As Object
Dim returnValue As Object

returnValue = instance.CreateItemFromTemplate(TemplatePath, _
    InFolder)
[DispIdAttribute()]
Object CreateItemFromTemplate(
    string TemplatePath,
    Object InFolder
)

Parameters

  • TemplatePath
    Type: System.String

    The path and file name of the Outlook template for the new item.

  • InFolder
    Type: System.Object

    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.

Return Value

Type: System.Object
An Object value that represents the new Microsoft Outlook item.

Remarks

New items will always open in compose mode, as opposed to read mode, regardless of the mode in which the items were saved to disk.

See Also

Reference

_Application Interface

_Application Members

Microsoft.Office.Interop.Outlook Namespace