NoteItem.SaveAs Method
Outlook Developer Reference |
Saves the Microsoft Outlook item to the specified path and in the format of the specified file type. If the file type is not specified, the MSG format (.msg) is used.
Syntax
expression.SaveAs(Path, Type)
expression A variable that represents a NoteItem object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Path | Required | String | The path in which to save the item. |
Type | Optional | Variant | The file type to save. Can be one of the following OlSaveAsType constants: olHTML, olMSG, olRTF, olTemplate, olDoc, olTXT, olVCal, olVCard, olICal, or olMSGUnicode. |
Remarks
Also note that even though olDoc is a valid OlSaveAsType constant, messages in HTML format cannot be saved in Document format, and the olDoc constant works only if Microsoft Word is set up as the default email editor.
Example
This Visual Basic for Applications (VBA) example uses the SaveAs method to save the currently open item as a text file in the Documents folder, using the subject as the file name. To run this example, make sure a mail item in plain text format is open in the active window.
Visual Basic for Applications |
---|
|
This Visual Basic for Applications example shows you how to create a template using the SaveAs method.
Visual Basic for Applications |
---|
|
See Also