Connecting Tech Pros Worldwide Help | Site Map

send Outlook email from different name?

joshua@ammann.com
Guest
 
Posts: n/a
#1: Nov 13 '05

Is there a way to set the FROM name (the name the recepient sees as the
one who sent the email) when using Access to create an Outlook email
message? (Using MS-Office 2000 SP3)

We set up an anonymous account to send survey messages to our customers
in the company-wide address book, but can I set the message to be sent
from that account in code? It always defaults to the normal (default)
"From" name Outlook sender.

Here's my code so far:
'-------------------------------------------------
Dim myOlApp As Object
Dim myEmail As Outlook.MailItem
Dim strDocName As String

Set myOlApp = CreateObject("Outlook.Application")
Set myEmail = myOlApp.CreateItem(olMailItem)

With myEmail
'Set Sender Name Here (doesn't work)
'.From = "Anonymous Account Name"
.To = Me![CustEmail]
.Subject = "Auto-Email"
.Body = "...Message Body..."
.Display
End With
'-------------------------------------------------

Thanks for any help,

~Joshua Ammann
joshua@ammann.com

joshua@ammann.com
Guest
 
Posts: n/a
#2: Nov 13 '05

re: send Outlook email from different name?


Found the answer. If anyone else is interested:

With myEmail
.SentOnBehalfOfName = "Anonymous Account Name"
End With


~Joshua Ammann

Closed Thread