• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 430
  • Last Modified:

ms outlook change the from email sent from using vba code

have my out look that i use to send out a 20 -30 emails for work, and when it arrives it says from peter@abc.com , but need to say that the email comes from john@abc.com
i am composing the email out of a DB and building it in the back end as below but cannot see how to change the email from in the header even though  i have the other email set up in the email account, were is the default setting to set this up
any help would be appreciated
using outlook 2003

               Dim olapp As Outlook.Application
               Dim objmail As Outlook.MailItem
               Dim pos As Integer
               Set olapp = Outlook.Application
               Set objmail = olapp.CreateItem(olMailItem)
               objmail.BodyFormat = olFormatRichText
  • 2
2 Solutions
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
According to Sue Mosher, who has forgotten more about Outlook than most of us will ever hope to know, there is no direct way to change the account for an outgoing message. See this posting in the MSFT newsgroups for more information.

I've taken to use vbMAPI from www.everythingaccess.com. It's a complete solution and requires no external DLL files. All the needed functionality is contained directly in the Access database. For the cost, it has saved me countless hours (and headaches).
Jeffrey CoachmanMIS LiasonCommented:
Being no Outlook/Excehnge Expert either,
... I remember that there may be features that let you "SendOnBehalfOf", ...or "SendAs"
(These may depend of Outlook "Delegate" assignments, or certain Exchange privileges,...  It may also depend on the version of Outlook or Exchange...?))

You can probably dig up more info from here...

sydneyguyAuthor Commented:
yep thanks for that
objmail.SentOnBehalfOfName = works perfectly so thanks for the assistance
sydneyguyAuthor Commented:
thanks for the help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now