Outlook Coding Problem

  • Thread starter Thread starter Saurabh Sharma
  • Start date Start date
S

Saurabh Sharma

Hi

I am reading all the mails from a particular outlook folder. I have to check
whether i have read the mail earlier or not which i am doing by checking id
of mail provided by outlook.
Problem is as the number of mails increases it becomes slow coz it goes to
everymail and check whether i have read it earlier through code and if not
it takes it and add. So even if one mail comes it will go through all the
mails.
Is there anything like setting custom flags and outlook can easily give me
those mails whose flag value is not set to a prticular value?

Thanx
Saurabh
 
Saurabh,

You should check out the Find method on the folder. You can pass it
criteria to find certain items in the folder.

Hope this helps.
 
Saurabh:

One possible alternative is to use the AdvancedSearch method of the
Application object. This allows you to search for unread mail items and
return those that match the criteria. The following KB articles give more
information on how to use this method and how to develop the correct filter
criteria. The second article shows how to have Outlook create the filter
criteria necessary for the Filter parameter. These articles are in VB,
however, the conversion to C# should be straightforward.

http://support.microsoft.com/default.aspx?scid=kb;en-us;326244
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnolbk02/html/odc_c11612730.asp

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi

I am reading all the mails from a particular outlook folder. I have to check
whether i have read the mail earlier or not which i am doing by checking id
of mail provided by outlook.
Problem is as the number of mails increases it becomes slow coz it goes to
everymail and check whether i have read it earlier through code and if not
it takes it and add. So even if one mail comes it will go through all the
mails.
Is there anything like setting custom flags and outlook can easily give me
those mails whose flag value is not set to a prticular value?

Thanx
Saurabh
 
Mails can be of any type and also can be read and unread by user and it
should not effect out parsing( So we cant use the filter of getting unread
mails) . I have to make a custom flag which can be used by the mileage
property of the mail item but i dont know how to get the items whose mileage
property is not set to a particular value.

Saurabh
 
Thanx
Problem solved

Saurabh
Saurabh Sharma said:
Mails can be of any type and also can be read and unread by user and it
should not effect out parsing( So we cant use the filter of getting unread
mails) . I have to make a custom flag which can be used by the mileage
property of the mail item but i dont know how to get the items whose
mileage property is not set to a particular value.

Saurabh
 
Back
Top