Anne Troy
MrExcel MVP
- Joined
- Feb 18, 2002
- Messages
- 2,632
- Office Version
- 365
- Platform
- Windows
I'm using Outlook locally with 2 accounts.
I want to send emails programatically using the "non-default" account.
I checked out "SendUsingAccount", but wasn't able to make that work.
Anyone know the syntax?
Here's my code:
I want to send emails programatically using the "non-default" account.
I checked out "SendUsingAccount", but wasn't able to make that work.
Anyone know the syntax?
Here's my code:
Code:
On Error Resume Next
With OutMail
'.From = Range("fromwho").Text this doesn't work, even if it's hard-coded email addy
.To = "anne@annetroy.com"
.CC = Range("driveremail").Text
.BCC = "anne@annetroy.com"
.Subject = Range("spsubj").Text
.Body = strbody
.Display 'or use .Send
End With
On Error GoTo 0