Reputation: 207
I Am using Excel VBA to iterate trough Outlook GAL. I need to be able to access the properties for each item
I am parting from the following code and trying to access the properties from AddressEntry
I have tried different thing using this code but I haven't been able to figure out how to get to the detail of each entry.
Private Sub GetAddresses()
Dim o, AddressList, AddressEntry
Set o = CreateObject("Outlook.Application")
Set AddressList = o.Session.AddressLists("Global Address List")
For Each AddressEntry In AddressList.AddressEntries
. . .
Next AddressEntry
End Sub
I need to get to the properties and extract information and pass it to an excel sheet:
I would have post a picture but don't have the rep.
If I select an item from the GAL and right-click and select properties, that is the information I am trying to retrieve.
Last Name,
First Name,
Alias,
etc.
How do I access this using Excel VBA?
Upvotes: 0
Views: 2134
Reputation: 66235
Call AddressEntry.GetExchangeUser to retrieve the ExchangeUser object: http://msdn.microsoft.com/en-us/library/office/dn320297(v=office.15).aspx
Upvotes: 1