Я не могу получить часть местоположения в списке контактов, он просто отображается пустым.
Sub GetOutlookAddressBook()
Dim objOutlook As Outlook.Application, objAddressList As Outlook.AddressList
Dim oItem As Outlook.AddressEntry, i As Long
Application.ScreenUpdating = False
Set objOutlook = CreateObject("Outlook.Application")
Set objAddressList = objOutlook.Session.AddressLists("Global Address List")
Sheets("Sheet1").Range("A:C").ClearContents
i = 2
For Each oItem In objAddressList.AddressEntries
If oItem.Address <> "" Then
Cells(i, "A") = oItem.Name
Cells(i, "B") = oItem.GetExchangeUser.ALIAS
Cells(i, "C") = oItem.GetExchangeUser.PrimarySmtpAddress
Cells(i, "D") = oItem.GetExchangeUser.Department
Cells(i, "E") = oItem.GetExchangeUser.Location 'cannot get location
i = i + 1
End If
Next
Application.ScreenUpdating = True
End Sub