Show Outlook Recipient Display Names Instead of Email Addresses from Excel VBA

dcoker

New Member
Joined
Dec 13, 2018
Messages
25
HI,

I have some VBA code that sends an email to specific recipients based on inputs from the user. The code works flawlessly. I just need to improve it to show the actual display names of the recipients rather than the specific email addresses. This way all recipients can see who is receiving the email, even if they do not know whose email address is whose. Is this possible?

Would I have to add this manually to the code for each recipient?

Current Example: bsmith@co.com
Example Wanted: Bob Smith

Rich (BB code):
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

    With Destwb
     
        On Error Resume Next
        With OutMail
        .display
            .To = ToEmails
            .CC = CCEmails
            .BCC = ""
            .Subject = "Random Subject"
            .HTMLBody = body & .HTMLBody
                             
        End With

Any help is appreciated!
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Kenneth Hobson

Well-known Member
Joined
Feb 6, 2007
Messages
3,092
The only way that would work is IF the sender has that name in their addresses as an alias. The email can include a name or label. e.g.
Ken Hobson (ken.hobson@gmail.com)
where () are <>.
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,109,431
Messages
5,528,735
Members
409,831
Latest member
KT50

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top