Full-Text Search In Outlook Contacts From Word?

  • Thread starter Thread starter Hubert
  • Start date Start date
H

Hubert

I am accessing an Outlook public folder containing over
12,000 contacts from a template within Word. Essentially,
my users would like to be able to search for any contact
where the company name includes the word that they are
searching for (e.g., a search for "Jones" would
find "Smith Jones & Co.".)

The only way I know to do this would be to cycle through
each item in the contacts folder using either the "Like"
operator or the "InStr" function or something like that .
[The Restrict and Find methods don't appear to allow
the "like" operator.] But cycling through 12,000 contacts
this way is much much too slow (over 3 minutes)!

Any ideas for accomplishing this faster? Is there a CDO
approach to this? Is there a way to utilize Outlook's Find
command?
 
CDO 1.21 is about an order of magnitude faster than using the Outlook
object model and has fewer memory leaks. However, in secure versions
of Outlook accessing a contact item as a CDO Message will fire the
security prompts. Your best bet is using Redemption code
(www.dimastr.com/redemption).

CDO MessageFilters don't allow you to do an InStr equivalent, BTW so
it would still be brute force code if you used CDO. If you use
Redemption's MAPITable object a TableFilter for it and set a
restriction or filter in that you can use a filter that includes the
text you want. That would be done by setting the ContentFuzzyLevel to
FL_SUBSTRING as part of your restriction.

There are examples of using Redemption's filtering on the Web site for
Redemption.
 
Back
Top