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

How do I change the From field when sending an Outlook message from Access?

I have multiple POP accounts in Outlook (under a single profile).  How do I send an Outlook message and change the from field from Access.

Here is the code I'm trying to use...

Set ola1 = New Outlook.Application

Dim oAccount As Outlook.Account
    For Each oAccount In ola1.Session.Accounts
    MsgBox oAccount.DisplayName
        If oAccount.AccountType = olPop3 Then
          If oAccount.DisplayName = "john@smith.com" Then
               'We found the correct Account
               Exit For
          End If
        End If
Set m = ola1.CreateItem(olMailItem)
m.SendUsingAccount = oAccount
m.Subject = "subject here"
If bolHTML = True Then
    m.HTMLBody = "hello1"
    m.Body = "hello2"
End If

1 Solution
Jeffrey CoachmanMIS LiasonCommented:
There are a few ways:
If you are using exchange, you can use "SendOnBehalfOf" (*only if you are assigned a delegate for this users account)
This will still let the recipient know that you are only delegated to send this email.

    YourEmailObject..SentOnBehalfOfName = "SomeOneElsesEmailAddress"

There is also "SendAs", ...but I am not sure if you can do this via VBA.
This makes it look like you ARE the sender.

But *obviously* you cannot SendAs anyone you like without the required permissions..

see here for more info:

Also see here for all things Outlook VBA:

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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