Oulook from Access - Designating the Email Sender

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have developed code (with help from past entries in this forum - thanks) to
write email from Access 2003 to Outlook 2003 (using object model). Works
fine ... except stumped on designating the "From" email address or name in
code. There are multiple addresses in Outlook. And no .From parameter
appears in the object model. When I use .SenderName or .SenderEmailAddress I
get an error message that this is "Read-only". (e.g. using
..SenderEmailAddress = (e-mail address removed)).

Probably an easy way to fix this, but can't seem to find it. Is there one?

Any help much appreciated.

TIA

Joe
 
hi Joe,

Joe said:
Probably an easy way to fix this, but can't seem to find it. Is there one?
How do you change the sender in Outlook manually?

mfG
--> stefan <--
 
How do you change the sender in Outlook manually?

Well, manually, "Accounts" is chosen from the Mail Message menu and the
appropriate sender is chosen. But I want this to be automatic with
completely hands-off operation fed from an Access module. Everything else
feeds perfectly.

Any guidance? Is there a CommandBars sequence that will do this? Or direct
command (like the .To =, .Subject =, etc. parameters).

Thanks
 
hi Joe,

Joe said:
Well, manually, "Accounts" is chosen from the Mail Message menu and the
appropriate sender is chosen.
I suppose you have to do the same via automation. So use the object
browser in the VBA IDE to look for Accounts.



mfG
--> stefan <--
 
Well, manually, "Accounts" is chosen from the Mail Message menu and the
appropriate sender is chosen. But I want this to be automatic with
completely hands-off operation fed from an Access module. Everything else
feeds perfectly.

Any guidance? Is there a CommandBars sequence that will do this? Or direct
command (like the .To =, .Subject =, etc. parameters).

Thanks

Use the SentOnBehalfOfName property for your mail item.
 
Actually, there is no "Accounts" parameter available. See reply from Alt255.
.SentOnBehalfOfName = "xxx.xxx@xxx" works perfectly. Go figure. That
would have been about my last guess.

Thanks for your replies and time.
 
Many thanks for your reply. It works perfectly - and it's about the last
thing I would have thought of. Once again the forum comes through - I
appreciate your expertise.

Joe
 

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

Back
Top