How to Get Username from Global Address Book

Status
Not open for further replies.
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)

-

"Benjamin" <Benjamin> wrote in message

news:F8ECB0BE-31C6-4B40-9388-B20C1A6582C3@microsoft.com...
> 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,
 
Status
Not open for further replies.
Top