VBA Send Outlook Email

VBA to send an Outlook email. If you want to send on behalf of a particular inbox then uncomment ‘.SendOnBehalfOfName and replace the box name.

‘ Enable Microsoft Outlook 14.0 Object Library
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
' .SentOnBehalfOfName = "Team Inbox Name"
.To = “Dylan.Gregory@vba-market.com”
.CC = “info@vba-market.com”
.Subject = "Subject Line"
.Attachments.Add "X:\Folder Path\File Name.pdf"
End With