Düzenle

Aracılığıyla paylaş


MailItem.SaveSentMessageFolder property (Outlook)

Returns or sets a Folder object that represents the folder in which a copy of the email message will be saved after being sent. Read/write.

Syntax

expression. SaveSentMessageFolder

expression A variable that represents a MailItem object.

Example

This Visual Basic for Applications (VBA) example sends a reply to Dan Wilson and sets the SaveMyPersonalItems folder as the folder in which a copy of the item will be saved after being sent. To run this example without errors, make sure a mail item is open in the active inspector window and replace 'Dan Wilson' with a valid recipient name.

Sub SetSentFolder() 
 
 Dim myItem As Outlook.MailITem 
 
 Dim myResponse As Outlook.MailITem 
 
 Dim mpfInbox As Outlook.Folder 
 
 Dim mpf As Outlook.Folder 
 
 
 
 Set mpfInbox = Application.Session.GetDefaultFolder(olFolderInbox) 
 
 Set mpf = mpfInbox.Folders.Add("SaveMyPersonalItems") 
 
 Set myItem = Application.ActiveInspector.CurrentItem 
 
 Set myResponse = myItem.Reply 
 
 myResponse.Display 
 
 myResponse.To = "Dan Wilson" 
 
 Set myResponse.SaveSentMessageFolder = mpf 
 
 myResponse.Send 
 
End Sub

See also

MailItem Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.