Sending letter from a specific mailbox

谁都会走 提交于 2021-02-10 15:17:14

问题


I want to send a letter via Outlook (using Excel VBA).

I need it to be from the department mailbox.

Current code looks like this:

Dim Outlookwindow As Outlook.Application
Dim NewLetter As Outlook.MailItem

Set Outlookwindow = New Outlook.Application
Set NewLetter = Outlookwindow .CreateItem(olMailItem)
  
With NewLetter 
    .BodyFormat = olFormatHTML
    .Display
    .HTMLBody = "Stuff and more stuff"
    .To = "people"
    .CC = "more people"
    .Subject = "About stuff"
    .Send
End With

Is there a way to send from the department and not my personal mailbox? Maybe something like .From exists?

来源:https://stackoverflow.com/questions/64715131/sending-letter-from-a-specific-mailbox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!