最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

OutlookVBAVSTO: How can I set the folder to store e-mail after being sent? - Stack Overflow

programmeradmin3浏览0评论

I created an automation script that's creating e-mails from a template e-mail file (.oft) and saving them to the Drafts folder for me to eventually send them manually.

In Outlook I set an option to store files in the same folder on reply/forward:

Apparently, when I originally created the template e-mail file from an e-mail stored in a folder, that folder location was stored along with the template. This is very nifty, because now, after sending the e-mails I created from the template, these are stored in that original folder location.

This brings the following question to my mind:

Can I set this folder location in VBA when creating an e-mail message from the template, so I can programatically determine where to store an e-mail after it has been manually sent?

I created an automation script that's creating e-mails from a template e-mail file (.oft) and saving them to the Drafts folder for me to eventually send them manually.

In Outlook I set an option to store files in the same folder on reply/forward:

Apparently, when I originally created the template e-mail file from an e-mail stored in a folder, that folder location was stored along with the template. This is very nifty, because now, after sending the e-mails I created from the template, these are stored in that original folder location.

This brings the following question to my mind:

Can I set this folder location in VBA when creating an e-mail message from the template, so I can programatically determine where to store an e-mail after it has been manually sent?

Share Improve this question asked Mar 11 at 12:16 AxDAxD 3,1945 gold badges40 silver badges64 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Of course - set MailItem.SaveSentMessageFolder property. See https://learn.microsoft/en-us/office/vba/api/outlook.mailitem.savesentmessagefolder

发布评论

评论列表(0)

  1. 暂无评论