共用方式為


Outlook) (ExchangeUser 物件

提供代表 Microsoft Exchange 信箱使用者 之 AddressEntry 的詳細資訊。

註解

ExchangeUser 衍生自 AddressEntry 物件,當呼叫者在 AddressEntry 物件上執行查詢介面時,會傳回它而不是 AddressEntry

此物件提供適用于 Exchange 使用者之屬性的第一級存取,例如 FirstNameJobTitleLastNameOfficeLocation。 您也可以透過 PropertyAccessor 物件,存取未在物件模型中公開之 Exchange 使用者特有的其他屬性。 請注意,部分明確內建屬性是可讀寫屬性。 設定這些屬性需要在適當的 Exchange 系統管理員帳戶下執行程式碼;若沒有足夠的許可權,呼叫 ExchangeUser.Update 方法會導致「許可權遭拒」錯誤。

範例

在下列程式碼範例中,會顯示如何取得 [Exchange 全域通訊清單] 中所有項目的商務電話號碼、辦公室位置及職稱。

Sub DemoAE() 
 
 Dim colAL As Outlook.AddressLists 
 
 Dim oAL As Outlook.AddressList 
 
 Dim colAE As Outlook.AddressEntries 
 
 Dim oAE As Outlook.AddressEntry 
 
 Dim oExUser As Outlook.ExchangeUser 
 
 Set colAL = Application.Session.AddressLists 
 
 For Each oAL In colAL 
 
 'Address list is an Exchange Global Address List 
 
 If oAL.AddressListType = olExchangeGlobalAddressList Then 
 
 Set colAE = oAL.AddressEntries 
 
 For Each oAE In colAE 
 
 If oAE.AddressEntryUserType = _ 
 
 olExchangeUserAddressEntry Then 
 
 Set oExUser = oAE.GetExchangeUser 
 
 Debug.Print(oExUser.JobTitle) 
 
 Debug.Print(oExUser.OfficeLocation) 
 
 Debug.Print(oExUser.BusinessTelephoneNumber) 
 
 End If 
 
 Next 
 
 End If 
 
 Next 
 
End Sub

方法

名稱
Delete
Details
GetContact
GetDirectReports
GetExchangeDistributionList
GetExchangeUser
GetExchangeUserManager
GetFreeBusy
GetMemberOfList
GetPicture
更新
GetUnifiedGroup
GetUnifiedGroupFromStore
IsUnifiedGroup

屬性

名稱
Address
AddressEntryUserType
Alias
Application
AssistantName
BusinessTelephoneNumber
City
Class
Comments
CompanyName
Department
DisplayType
FirstName
ID
JobTitle
LastName
MobileTelephoneNumber
Name
OfficeLocation
Parent
PostalCode
PrimarySmtpAddress
PropertyAccessor
Session
StateOrProvince
StreetAddress
Type
YomiCompanyName
YomiDepartment
YomiDisplayName
YomiFirstName
YomiLastName

另請參閱

ExchangeUser 物件成員Outlook 物件模型參考

支援和意見反應

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