共用方式為


Access Exchange User or Distribution List Information from the Address Book

This topic describes the objects that support accessing information about an Exchange user or distribution list from the Address Book.

The Address Book contains address lists of users, distribution lists, and other types of address entries, as enumerated by OlAddressEntryUserType. Specifically, the Exchange user address entry and the Exchange distribution list address entry have many of their properties exposed as explicit built-in properties in the Outlook object model through the ExchangeUser and ExchangeDistributionList objects. Both of these objects inherit from the AddressEntry object. They also support specific methods that facilitate accessing information about these entry types.

Exchange User

The ExchangeUser object supports properties like OfficeLocation, JobTitle, FirstName, and LastName that the parent AddressEntry object does not support. You can access these properties directly through the ExchangeUser object. You can access other properties of the Exchange user that are not exposed in the object model using ExchangeUser.PropertyAccessor.

The ExchangeUser object also supports methods like GetDirectReports, GetExchangeUserManager, and GetMemberOfList to facilitate accessing information specific to this Exchange user, such as full AddressEntry information for the associated direct reports, manager, and distribution lists.

Security

Certain properties like OfficeLocation and JobTitle are read-write and can only be updated (using ExchangeUser.Update) by code that is running under an appropriate Exchange administrator account.

Exchange Distribution List

The ExchangeDistributionList obect supports properties like Alias, Comments, and PrimarySmtpAddress that the parent AddressEntry object does not support. Other properties of the Exchange distribution list that are not exposed in the object model are accessible through ExchangeDistributionList.PropertyAccessor.

The ExchangeDistributionList object also supports methods like GetExchangeDistributionListMembers, GetMemberOfList and GetOwners to facilitate accessing information specific to a distribution list, such as full AddressEntry information for the associated members in this distribution list, other distribution lists that this list is a member of, and owners of this list.

Security

Certain properties like Comments are read-write and can only be updated (using ExchangeDistributionList.Update) by code that is running under an appropriate Exchange administrator account.