Finding A Contact in GAL

  • Thread starter Thread starter Longus
  • Start date Start date
L

Longus

Hello world,

i tried to extract a email adress out of outlook global address list
using excel vba. I can create a outlook application object, can access
the GAL and all AddressEntries in the list, now i want to create a
filter object on the list, i can't search each object (>500.000
entries), but the filter quits with object doesn't support medthod...

sub ReturnEmail()

Dim oOL As Object
Dim oAdr As Object
Dim oEntry As Object
Dim oFilter as Object
Dim oCount As Long
Dim searchName As String

Set oOL = CreateObject("Outlook.Application")
Set oAdr = oOL.Session.AddressLists("Global Address
List").AddressEntries
Set oFilter = oAdr.Filter <- creates error

<what now?>

I can't find any documentation about the correct use of filters in
excel vba.

Please help

Thx world, greetings from germany

I'm not very good neither at vba nor in english :-), so if anyone has
a idea or 3 lines of source, let me know
 
When in doubt use the Object Browser. There is no Filter object for an
AddressEntries collection in the Outlook object model.

Redemption (www.dimastr.com/redemption) has a MAPITable object for its
AddressEntries collection, you can use the Filter for a MAPITable to
restrict the AddressEntries collection using a name prefix only. CDO 1.21
has an AddressEntries.Filter object, that can filter on various things,
information on that is in the CDO 1.21 Help file (available for download at
www.cdolive.com).
 
Back
Top