Consulting

Results 1 to 2 of 2

Thread: **Need a Guru help** Resolving ID's to their email address in outlook

  1. #1

    **Need a Guru help** Resolving ID's to their email address in outlook

    Ok, let me give you an example of what I am trying to do.
    Within my corporation, we all have ID's, when you put that ID in a To: field, it displays that persons name, and not their actual internal email address.

    If I paste a list of ID's in the BODY of the email, and you right click on that ID, and click on WhoIs it displays the properties of that ID. I'm trying to get the SMTP info for that ID e.g If your corporate ID\Domain user name was Guru1 if I put Guru1 in an emails to field it may list John.Doe@Domain.com What I am trying to get is the John.Doe@Domain.com, but for a list of users.

    So in the body of the email for example say I have a list of five users.

    Guru1
    Guru2
    Guru3
    Guru4
    Guru5

    I want the email address to each of them. I cant find a basic option in outlook that resolves their ID to their email in the to field. It is irritating there is not such a simple option to simply display their email, instead outlook in the To field, displays their name in lastname,first name format. Ide rather it be last.first@domain.com

    Any help would be appreciated.

  2. #2
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    If anything, I'm sure that's an Exchange setting (showing the display name instead of the email address).

    What do you see when you run this code?

    [VBA]
    Sub getem()
    MsgBox GetEmailAddress("Guru1")
    End Sub
    Function GetEmailAddress(idnum As String)
    Dim username As String
    username = session.CreateRecipient(idnum).AddressEntry.Address
    End Function
    [/VBA]
    Regards,
    JP

    Read the FAQ
    Getting free help on the web
    My website
    Please use [vba][/vba] tags when posting code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •