Change "From:" Field with Automated Email From Access with Outlook

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pwag
    New Member
    • Feb 2014
    • 28

    Change "From:" Field with Automated Email From Access with Outlook

    Good Afternoon,

    I have found a Function to automate Emails from Outlook through Access. I was curious if there was a way to change the sender information when sending the email, specifically just name field? My code only delivers the originators information, rightfully so, since the mail was sent from that senders desktop. Is there a way to declare a sender NAME prior to sending the email?

    So, in the recipients Outlook inbox I would like to see...

    Awesome Access Project

    INSTEAD OF

    Smith, John

    Here is some code I have thusfar.

    Code:
    With appOutlookMsg
    Set appOutlookRec = appOutlookMsg.Recipients.Add(MyEmail)
        appOutlookRec.Type = olTo
        .Subject = "QII Database Reminder"
        .Body = "This is just a test."
        '.Display
        .send
    End With
    THANKS AGAIN!
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    #2
    pwag,
    Try the .SentOnBehalfOf Name property. That will fill in the from address area, so you would need an email address set up with the name you want to appear.

    Jim

    Comment

    • pwag
      New Member
      • Feb 2014
      • 28

      #3
      Thanks Jim. I have tried this and it appears this will also require a New Group in Outlook to be created along with giving all users of that group "authority" to execute outgoing mail on behalf of? Getting deeper.....

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        As it appears that you are using outlook as the email client.
        You thereform might find the information in the following insight article most helpful: Application Automation.

        (infact, you really should take the time to look at all of the insight article titles Microsoft Access / VBA Insights Sitemap you'll find that some are a little dated; however, they're all usually very helpfull!)

        This should cover just about everything you need, if you don't understand something in the Application Automation article as it applies to using Outlook for your email, post your question back to this thread.
        Last edited by zmbd; Apr 18 '14, 10:43 PM.

        Comment

        • pwag
          New Member
          • Feb 2014
          • 28

          #5
          Hi Zmbd,

          Wow. Great resource. Thanks for sharing those links!

          P

          Comment

          Working...