Simulate Find

D

dorutzu

Hi!

I have an Outlook addin with a custom button in a toolbar. When I press
this button, I would like to search for certain mailitems (using
AdvancedSearch), and display them in a list (view)...something similar to
what Find does, but programatically.
Any idea how this could be done (the display I mean...the search works just
fine)?

Thanks,
Doru
 
K

Ken Slovak - [MVP - Outlook]

The results of a Search object are, oddly enough, stored in a Results
collection. That collection has Count and Item properties that can be used
in a For loop, it also has a full set of the Get functions (GetFirst,
GetLast, GetNext and GetPrevious).

Iterate that collection and display whatever information you want from each
item in the collection in a list or grid or whatever in a custom form you
design.
 

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