SaveAs during ItemSend event

Add-in Express™ Support Service
That's what is more important than anything else

SaveAs during ItemSend event
 
Tony Hunt




Posts: 13
Joined: 2011-06-10
I would like to save a local copy of a message in Outlook.

I see the MailItem.SaveAs(WideString,OleVariant) but am uncertain what the OleVariant is for and can find no reference to the MailItem object in the adxnet2010.PDF which comes with ADX.

Is there another help PDF I'm unable to find??

Best Wishes

Tony Hunt
Posted 23 Jun, 2011 07:05:31 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hi Tony,

Saves the Microsoft Outlookitem (item: An item is the basic element that holds information in Outlook (similar to a file in other programs). Items include e-mail messages, appointments, contacts, tasks, journal entries, notes, posted items, and documents.) 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 MailItem 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.



Getting Help on COM Objects, Properties and Methods

To get assistance with host applications?Â?Ð?é objects, their properties, and methods as well as help info, use the Object Browser. Go to the VBA environment (in the host application, choose menu Tools | Macro | Visual Basic Editor or just press {Alt+F11}), press {F2}, select the host application in the topmost combo and/or specify a search string in the search combo. Select a class /property /method and press {F1} to get the help topic that relates to the object.



Andrei Smolin
Add-in Express Team Leader
Posted 23 Jun, 2011 07:17:02 Top