.SendUsingAccount

N

NHelp

Good morning and thank you to everyone in advance for your help!

I am trying to send an e-mail from a specific e-mail address in Outloo
2010. From what I have read, you can use the .SendUsingAccount to d
this, however, it only accepts an object as the parameter. How do yo
set an object equal to a specific e-mail address. I am on a corporat
network and the inbox I am sending from is not in my list, but I hav
access to it.

I am basically trying to find a way to do this the same way you would i
Access or Excel by using ".From = (e-mail address removed)".

Thanks for your help
 
M

Michael Bednarek

Good morning and thank you to everyone in advance for your help!

I am trying to send an e-mail from a specific e-mail address in Outlook
2010. From what I have read, you can use the .SendUsingAccount to do
this, however, it only accepts an object as the parameter. How do you
set an object equal to a specific e-mail address. I am on a corporate
network and the inbox I am sending from is not in my list, but I have
access to it.

I am basically trying to find a way to do this the same way you would in
Access or Excel by using ".From = (e-mail address removed)".

I'm not sure e-mail messages can be sent from an arbitrary sender's
address in Outlook; in our Exchange environment they can't.

However, if you have attached other accounts to your Outlook profile,
..SendUsingAccount can be used as follows:

Dim objMailItem As Outlook.MailItem
Set objMailItem = Application.CreateItem(olMailItem)
With objMailItem
.SendUsingAccount = Application.Session.Accounts("<account's display name>")
' [other stuff to populate the message)
.Display ' or .Send
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top