View Single Post
  #3  
Old June 21st 07, 02:03 PM posted to microsoft.public.outlook.program_addins
bstrum
external usenet poster
 
Posts: 19
Default How to find a mailitem

I found the help page with shows "ConversationIndex" as a valid filter. When
I use it though, I get the exception "The property "ConversationIndex" in the
condition is not valid." Any ideas why?

My code looks like this:

string idx = ".....";
IOUT.Application app = (IOUT.Application)oApp;
IOUT.MAPIFolder f =
app.Session.GetDefaultFolder(IOUT.OlDefaultFolders .olFolderInbox);
string filter = string.Format("[ConversationIndex] = '{0}'",
idx);
object o = f.Items.Restrict(filter);

"Michael Bauer [MVP - Outlook]" wrote:



The VBA help provides you with a sample. The easiest way is to select the
Find function in the object browser (f2) and then click f1.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize Outlook email:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Wed, 20 Jun 2007 16:41:56 -0700 schrieb bstrum:

Given a conversationindex and conversationtopic, how do I find a mailitem?

I
have looked at Session.GetDefaultFolder(...).Items.Find but I do not see

any
examples of how to construct the search string with these parameters.

Thank you,

Benjamin Strum
ThinkTron Corporation


Ads