共用方式為


Outlook) (ExchangeDistributionList 物件

ExchangeDistributionList 物件會提供代表 Exchange 通訊群組清單之 AddressEntry 的詳細資訊。

註解

ExchangeDistributionListAddressEntry 的衍生類別,當呼叫者在 AddressEntry 上執行 QueryInterface 時,會傳回它而不是 AddressEntry

AddressEntry.Members屬性支援列舉通訊群組清單的成員。 ExchangeDistributionList 會新增 AliasCommentsPrimarySmtpAddress 的最高類別屬性。 您也可以透過 PropertyAccessor 物件,存取未在物件模型中公開之 Exchange 通訊群組清單特定的其他屬性。

部分屬性例如 Comments 是可讀寫屬性。 設定這些屬性需要在適當的 Exchange 系統管理員帳戶下執行程式碼;若沒有足夠的許可權,呼叫 ExchangeUser.Update 方法會導致「許可權遭拒」錯誤。

範例

下列程式碼範例會顯示如何取得目前使用者之主管所屬的 Exchange 通訊群組清單名稱。 它會使用 ExchangeUser.GetExchangeUserManager 方法來取得使用者管理員的相關資訊,並使用 ExchangeUser.GetMemberOfList 取得通訊群組清單, (由 ExchangeDistributionList 物件所代表,) 管理員已加入。

Sub ShowManagerDistLists() 
 Dim oAE As Outlook.AddressEntry 
 Dim oExUser As Outlook.ExchangeUser 
 Dim oDistListEntries As Outlook.AddressEntries 
 
 'Obtain the AddressEntry for CurrentUser 
 Set oExUser = _ 
 Application.Session.CurrentUser.AddressEntry.GetExchangeUser 
 
 'Obtain distribution lists that the user's manager has joined 
 Set oDistListEntries = oExUser.GetExchangeUserManager.GetMemberOfList 
 For Each oAE In oDistListEntries 
 If oAE.AddressEntryUserType = _ 
 olExchangeDistributionListAddressEntry Then 
 Debug.Print (oAE.name) 
 End If 
 Next 
End Sub 

方法

名稱
Delete
Details
GetContact
GetExchangeDistributionList
GetExchangeDistributionListMembers
GetExchangeUser
GetFreeBusy
GetMemberOfList
GetOwners
更新
GetUnifiedGroup
GetUnifiedGroupFromStore
IsUnifiedGroup

屬性

名稱
Address
AddressEntryUserType
Alias
Application
Class
Comments
DisplayType
ID
名稱
Parent
PrimarySmtpAddress
PropertyAccessor
Session
Type

另請參閱

Outlook 物件模型參考

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應