I am using the following code to send emails through Outlook using VBA in Excel. I have two emails addresses set up in Outlook. I'd like to send the email from my secondary email account. How would I do that?
Dim objOL
Dim objAppt
Const olAppointmentItem = 1
Const olMeeting = 1
Set objOL = CreateObject("Outlook.Application")
Set objAppt = objOL.CreateItem(0)
With objAppt
.display
End With
signature = objAppt.HTMLBody
With objAppt
.to = Range("H3").Value
.Subject = Range("L3").Value
.CC = Range("K3").Value
.HTMLBody = Body
.display 'display not send
End With
Set objAppt = Nothing
Set objOL = Nothing