傳回或設定一個 Folder 物件,代表在傳送電子郵件訊息複本之後會儲存的資料夾。 讀取/寫入。
語法
expression。 SaveSentMessageFolder
運算式 代表 MailItem 物件的變數。
範例
這個 Visual Basic for Applications (VBA) 範例會傳送回覆給 Dan Wilson,並將資料夾 SaveMyPersonalItems 設定為在傳送後儲存項目複本的資料夾。 若要執行這個範例時不發生錯誤,請確定作用中查閱程式視窗內已開啟郵件項目,並以有效的收件者名稱取代 'Dan Wilson'。
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
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。