View Single Post
  #4  
Old January 19th 09, 01:56 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Are user-defined fields indexed for Advanced Search?

The Outlook object model is not multi-threaded at all. In fact if you call
the OOM on a background thread you will hang or crash Outlook.

There is no way to automatically create an index for an AdvancedSearch,
which is the code equivalent for the Advanced Find method. AdvancedSearch is
asynch, so you can just set an event handler for the AdvancedSearchComplete
event.

If you want faster you'd have to use a different API such as CDO 1.21 or
Extended MAPI (C++ or Delphi code only) or Redemption
(www.dimastr.com/redemption) and set up a restriction on a search folder,
which is roughly what you're doing when you initiate an AdvancedSearch.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mark B" wrote in message
...
If not automatically indexed then for Advanced Find, is there a way to
create an index?

The reason is we are trying to find an email, normally using GetItemFromID
but if it has been moved to another folder we'd then have to regress to
the slower Advanced Find method.

I can't see any other way to find an email since using the Find method
isn't multi-threaded and locks up the GUI.


Ads