471,327 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,327 software developers and data experts.

Outlook Coding Problem

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
Dec 9 '05 #1
4 2226
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"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

Dec 9 '05 #2
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

Dec 9 '05 #3
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
"David Lloyd" <Da***@NoSpamPlease.com> wrote in message
news:9m***************@bignews5.bellsouth.net...
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

Dec 12 '05 #4
Thanx
Problem solved

Saurabh
"Saurabh Sharma" <sa*****@hireproindia.com> wrote in message
news:up**************@TK2MSFTNGP09.phx.gbl...
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
"David Lloyd" <Da***@NoSpamPlease.com> wrote in message
news:9m***************@bignews5.bellsouth.net...
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


Dec 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Steve | last post: by
reply views Thread by Chris Gatto | last post: by
reply views Thread by Minh Nguyen | last post: by
4 posts views Thread by Brian Hampson | last post: by
1 post views Thread by keri | last post: by
2 posts views Thread by Vighneswar | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.