Menu
What I need is when the date in either column comes within 30 days to auto send an email, address in column 'A', recipients name in column 'B'. And then place todays date in column 'P'. ALso need to send a follow up email when either date comes within 7days and then place todays date in column 'Q'.
-->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.
![Vba Auto Increment File Name Warning Vba Auto Increment File Name Warning](/uploads/1/2/5/6/125694760/490843806.png)
expression**.SaveAs**(Path, Type)
*expression * Required. An expression that returns one of the objects in the Applies To list.
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
When you use the SaveAs method to save items to the file system, you receive an 'address book' warning message. This includes all types of items, whether or not the items have attachments or active content. This change has been made so that someone cannot programmatically save items to a file and then parse the file to retrieve e-mail addresses.
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 C: 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.
If you use Microsoft Visual Basic Scripting Edition (VBScript) in an Outlook form, you do not create the Application object, and you cannot use named constants. This example shows how to save the current item using VBScript code.
This Visual Basic for Applications example shows you how to create a template using the Save As method.
Applies to | AppointmentItem Object | ContactItem Object | DistListItem Object | DocumentItem Object | JournalItem Object | MailItem Object | MeetingItem Object | NoteItem Object | PostItem Object | RemoteItem Object | ReportItem Object | TaskItem Object | TaskRequestAcceptItem Object | TaskRequestDeclineItem Object | TaskRequestItem Object | TaskRequestUpdateItem Object