Application.CreateItem Method
Outlook Developer Reference |
Creates and returns a new Microsoft Outlook item.
Syntax
expression.CreateItem(ItemType)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
ItemType | Required | OlItemType | The Outlook item type for the new item. |
Return Value
An Object value that represents the new Outlook item.
Remarks
The CreateItem method can only create default Outlook items. To create new items using a custom form, use the Add method on the Items collection.
Example
The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example creates a new MailItem object and sets the BodyFormat property to olFormatHTML. The Body text of the e-mail item will now appear in HTML format.
Visual Basic for Applications |
---|
|
See Also