Does anyone know of a way in which I can access the Global Address List which Outlook 98 displays in the Address Book from Excel 97 or Access 97 so that I can produce lists of users dependant on criteria from a form or cells?
'***************************************************************************************************
Dim myOlApp, myNameSpace, myEntity As Object
Set myOlApp = CreateObject("Outlook.Application"
Set myNameSpace = myOlApp.GetNamespace("MAPI"
MsgBox myNameSpace.AddressLists.Count
Set myGAddressList = myNameSpace.AddressLists("Global Address List"
'Set myPAddressList = myNameSpace.AddressLists("Personal Address Book" 'or so on..
MsgBox myGAddressList.AddressEntries.Count
For i = 1 To myGAddressList.AddressEntries.Count
'if in the addreess list are a number of _
adresses (at us 79000) it will be very slow.
Set myEntity = myGAddressList.AddressEntries(i)
If Left(myEntity.Name, 2) = "Ta" Then
MsgBox myEntity.Name
MsgBox myEntity.Address
End If
Next i
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.