I'm currently using outlook.application
to send mail from a shared mailbox.
I need a way to send these messages without my email address appearing on the 'from' list. It should only be the shared mailbox appearing. At the moment i'm using .sentOnBehalfOf
, is there something else i should be using?
Request Send As permission.
You should be able choose the shared account in the From field of email.
Use .SendUsingAccount to specify the shared account in VBA.
http://www.rondebruin.nl/win/s1/outlook/account.htm
Sub Which_Account_Number()
'Don't forget to set a reference to Outlook in the VBA editor
Dim OutApp As Outlook.Application
Dim I As Long
Set OutApp = CreateObject("Outlook.Application")
For I = 1 To OutApp.Session.Accounts.Count
MsgBox OutApp.Session.Accounts.Item(I) & " : This is account number " & I
Next I
End Sub
The shared account will likely be 2.
With OutMail
.SendUsingAccount = OutApp.Session.Accounts.Item(2)
End With
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.