using filter object on GAL

W

wejiv

Hello,
I have been trying to use the filter object on the GAL so that I would only
get items that have CdoPR_DISPLAY_TYPE=0 . I tried:
==================================
Set objAddressList = objSession.GetAddressList(cdoAddressListGal)
Set objAddressEntries = objAddressList.AddressEntries
Set objAddressFilter = objAddressEntries.Filter

'Set to filter out everything but desired Exchange user accounts
Dim AccountType As Long
Dim cdoAccountType As Long
AccountType = 0
cdoAccountType = CdoPR_DISPLAY_TYPE '&H39000003
objAddressFilter.Fields.Add cdoAccountType, AccountType

For Each objAddressEntry In objAddressEntries
==================================
but the above code doesn't return any items after running for 4 minutes. The
only way I get it working is if drop the filter object and loop over every
item while testing the value myself. The above code never executes the code
inside the for next loop because it never returns any items. Can anyone tell
me why it doesn't work?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top