473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 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 2319
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve | last post by:
Hi, I've small website and "stole" a javascript routine that uses HTML forms and MAILTO command. This worked 2 years ago but hasn't recently. Now the message gets stuck in Outlook's OUTBOX and...
3
by: deko | last post by:
When adding Outlook Appointment Items from Access, should I use: Set ol = New Outlook.Application --or-- Set ol = CreateObject("Outlook.Application") Outlook seems to crash either way. The...
0
by: Chris Gatto | last post by:
Hello, I'm hoping that someone out there has a wonderfully simple answer for this - it seems like it should. I am using an ASP.Net application to try and create calendar appointments in user's...
0
by: Minh Nguyen | last post by:
Dear all Any one can give me an ideas or code sample to create dynamic Outlook Form by Coding in C#. This form will inherit from New Mail Message Form (MS Outlook 2003). Thanks you very much.
4
by: Brian Hampson | last post by:
I recently upgraded to Outlook 2007 B2TR and have found that I can no longer code against MAPI.DLL It's gone :( Using C#, I used to get the MAPI session, and from that I could change the out of...
1
by: keri | last post by:
Hi everyone, After numerous failed attempts at this I am now trying again to solve this problem. I really would appreciate ANY help as I have been stumped with this for weeks and weeks! I...
1
by: askier | last post by:
Hi all, I've been charged with this little project and while I'm thinking that .Net might be the way to go, I'd love to hear some feedback from all you gurus ;) Here's the problem. - An e-mail...
0
by: RodneyAnonymous | last post by:
I need to be able to put the contents of a RichTextBox, including formatting and images, into a new Outlook e-mail. So far, the results I have are either that I lose all formatting and keep only the...
2
by: Vighneswar | last post by:
Hi All I am doing with a standalone application in .NET, where I have to invoke the Outlook / Outlook Express by passing account info (username, password, pop3 server, ... etc) and SQL Server...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.