Butters
Butters

Reputation: 1057

C# outlook search address antry by ID, Username or Alias

Hi Guys I need an solution to find an contact of my GlobalAddressList by ID, Username or Alias.

This is my try, but only for an search by name:

AddressList gal = appl.Session.GetGlobalAddressList();
AddressEntry entry = gal.AddressEntries["xxxx"];
ExchangeUser ae = entry.GetExchangeUser();

Upvotes: 2

Views: 1269

Answers (1)

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66215

Call Namespace.CreateRecipient, Recipient.Resolve, tnen use Recipient.AddressEntry.

What Id do you mean? EntryID (use Namespace.GetAddressEntryFromID) or some other id, such as SMTP address or NT account name?

Upvotes: 1

Related Questions