473,781 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2337
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.co m

"Saurabh Sharma" <sa*****@hirepr oindia.com> wrote in message
news:ev******** ******@TK2MSFTN GP11.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*****@hirepr oindia.com> wrote in message
news:ev******** ******@TK2MSFTN GP11.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***@NoSpamPl ease.com> wrote in message
news:9m******** *******@bignews 5.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*****@hirepr oindia.com> wrote in message
news:ev******** ******@TK2MSFTN GP11.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*****@hirepr oindia.com> wrote in message
news:up******** ******@TK2MSFTN GP09.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***@NoSpamPl ease.com> wrote in message
news:9m******** *******@bignews 5.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*****@hirepr oindia.com> wrote in message
news:ev******** ******@TK2MSFTN GP11.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
3100
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 never gets sent. Not sure "where" the problem is but things that have changed are... now Internet Explorer pops a window "saying" ... Windows is going to expose your email address to the addressee... and then a window pops from Outlook (it...
3
4989
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 Outlook application (and/or Calendar) may or may not be open when this sub runs.
0
233
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 outlook mailboxes. I have a reference to the Outlook 11 COM object in my project. Also, I am using identity_ impersonate = true in my web.config file using my own credentials in username/password (I am the administrator on the box). In order...
0
995
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
15073
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 office. No longer. Does anyone know how to do this using the new Microsoft.Office.Core and Microsoft.Office.Outlook DLL's that are supposed to be the new replacements? Here's what I had that worked until Outlook 2007 came around:
1
7955
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 have a form (frmappointments) through which I create an appointment item in my outlook calendar, (and save the appointment to tblappointments in my database). The appid in my table is set to match the entryid of the outlook appointment item, using...
1
1318
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 comes in from source x to user y. User y uses Outlook in an Exchange environment. The email contains an Excel attachment. - The attachment is almost standard - a 2 column x 15-20 row matrix. Now the fun starts: a) depending on certain criteria,...
0
2110
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 text, or get the text of all the RTF formatting - neither of which are acceptable. The code I'm using is below: Outlook.Application outlookApp = new Outlook.Application(); Outlook.MailItem email =...
2
2499
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 client by passing the connection details. I request anyone can suggest me the approach in meeting the requirement. Thanks in advance. Regards
0
9639
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10143
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8964
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.