My code below gives me the following error at the Debug.Print(oExuser.Alias), why?
Sub Test()
Dim AliasName, FullName As String
Dim outlookApp As Outlook.Application
Dim myNameSpace As Outlook.nameSpace
Dim myAddrList As AddressList
Dim myAddrEntries As AddressEntries
Dim myAddrEntry As Outlook.AddressEntry
Dim myAlias As Object
Dim oExUser As Outlook.ExchangeUser
Set outlookApp = New Outlook.Application
Set myNameSpace = outlookApp.GetNamespace("MAPI")
Set myAddrList = myNameSpace.GetGlobalAddressList()
Set myAddrEntries = myAddrList.AddressEntries
Set myAddrEntry = myAddrEntries.Item(1)
Set oExUser = myAddrEntry.GetExchangeUser
Debug.Print (oExUser.Alias)
End Sub

You have to be connected to the Exchange server to use the AddressEntry.GetExchangeUser method. The following code makes sense only for the Exchange accounts:
The
Aliasproperty returns an empty string if this property has not been implemented or does not exist for theExchangeUserobject.