I'm using the following code to send emails. Works just fine.
Is it possible to have it send it through a specific Outlook account? I have several accounts and have to change back and forth a lot.
Thanks!
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.To = [Memailsent]
.CC = [Memailsent1]
' .bcc = ""
.Attachments.Add "Attachement.pdf"
.Subject = "Subject"
.Body = "Body"
' .Send
.Display
End With
Is it possible to have it send it through a specific Outlook account? I have several accounts and have to change back and forth a lot.
Thanks!
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.To = [Memailsent]
.CC = [Memailsent1]
' .bcc = ""
.Attachments.Add "Attachement.pdf"
.Subject = "Subject"
.Body = "Body"
' .Send
.Display
End With