Selasa, 06 Maret 2012

[ExcelVBA] Re: searchin outlook address book

 

Hi Michael

Right now you are, on average, looking through 50% (25000) names each time
you do a lookup.

For each probe into the address list, you are making a networked access into
this list.

I don't have the resources to test this (no access to a "global address
list"), but

You might try

Dim objAddressListEntries As Outlook.AddressEntries

Set objAddressListEntries = objAddressList.AddressEntries

objAddressListEntries.Sort "ID"

then use a binary search algorithm. This would cut your average searches
per item from 25,000 to less than 20.

Db

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar