information From Global Address Book into list box.

E

ELGIN

HI,
I am new in this. I have to get the Information from the GAL into the listbox. First i would need to find the User name from the GAL. then which i would need to get the information(phone number, address, alias, department) of the selected name output into the listbox of the UserForm.
I manage only to get the userName into the combolist. But Can anyone how can i use the selected name to extract out the details of the selected name from the combolist?

Public Sub Import_Contacts()

Set olApp = New Outlook.Application
Set olNamespace = olApp.GetNamespace("MAPI")
Set olAddressList = olNamespace.AddressLists("Global Address List")

narCNT = olAddressList.AddressEntries.count

redim strarray(narCNT+1)
i=0

For Each olAB In olAddressList.AddressEntries

STRArray(i)=trim(olAB.NAme)
comboList1.addItem (strArray(i))
i=i+1
do events

next olAB

set olApp = nothing
End Sub
 
Top