How to Get Username from Global Address Book

B

Benjamin

I l'd like to look up the username from a cell in Excel,
which would contain their full name.
Then populate the next cell with the username I looked up.

Example:
Smith, Trevor J
Woo, Thomas

alias:
smithtj
twoo

I need to use the global address book in outlook.
I'm fine with Excel code, but Outlook I haven't ever stepped into.

Can someone shed some light on this, maybe some code to get the user alias,
from looking up the full name.

-Thanks in advance,
 
D

Dmitry Streblechenko

Use ExchangeUser.Alias. Call AddressEntry.GetExchangeUser to get
ExchangeUser object - it will be null unless the item comes from GAL.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top