excel vba retrieving outlook email adress from username RRS feed

  • Question

  • Hi Community,

    I am trying to retrieve an email adress from a username. eg: My Login-name is GrotheR and as a result I want my email adress.

    Opening the Global address list and searching via a for...each loop is an absolute nogo (we have 211000 entries in the GAL)

    What I want is some way like outlook does it when you enter something in the "Search address book"-Textfield.

    any ideas



    It's no problem, it's just the syntax

    Thursday, April 4, 2013 7:27 AM


  • If you are talking about the logged on user, use Namespace.CurrentUser to access the Recipient object and get the user's email from there.  However, if this user is in your Exchange org you have to use Recipient.AddressEntry.GetExchangeUser to read ExchangeUser.SMTPAddress for something usable.

    Otherwise, one trick is to use Namespace.CreateRecipient and try to resolve the user name into a Recipient object to get their address.

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    • Marked as answer by Roland Grothe Monday, April 15, 2013 1:58 PM
    Thursday, April 4, 2013 2:27 PM