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...b;en-us;326244 http://msdn.microsoft.com/library/de..._c11612730.asp
--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com
This response is supplied "as is" without any representations or warranties.
"Saurabh Sharma" <sa*****@hireproindia.com> wrote in message
news:ev**************@TK2MSFTNGP11.phx.gbl...
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