473,396 Members | 1,996 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,396 software developers and data experts.

Outlook 2002 to 2003 Issue

seraieis
Hello all!

I'm having a strange issue happen from a recent upgrade from Outlook 2002 to 2003. Here is a dumbed down version of the main loop I'm using to debug the problem:

Expand|Select|Wrap|Line Numbers
  1.     Dim app As Outlook.Application
  2.     Dim ns As Outlook.namespace
  3.     Dim inbox As Outlook.mapifolder
  4.     Dim item As Object
  5.     Dim msg As Outlook.mailitem
  6.     Dim rpt As Outlook.reportitem
  7.  
  8.     Set app = GetObject(, "Outlook.Application")
  9.     Set ns = app.session
  10.     ns.logon
  11.     Set inbox = ns.getdefaultfolder(olfolderinbox)
  12.  
  13.     Debug.Print "inbox items:  " & inbox.Items.Count
  14.     For Each item In inbox.Items
  15.         Select Case TypeName(item)
  16.             Case "ReportItem"
  17.                 Set rpt = item
  18.                 Debug.Print "ReportItem: " & rpt.Subject
  19.             Case "MeetingItem"
  20.                 Debug.Print "MeetingItem"
  21.             Case "MailItem"
  22.                 Set msg = item
  23.                 Debug.Print "MailItem: " & msg.Subject
  24.  
  25.                 'go off any handle the mail item
  26.                 'through subcode
  27.  
  28.                 msg.UnRead = false  '*************************** Issue here!!
  29.             Case Else
  30.                 Debug.Print "We don't care about this type"
  31.         End Select
  32.     Next item
  33.  
What it does is loop through all items in the inbox and when it comes across a MailItem, it saves the attachments (with specific file names) to a network drive and marks the email as unread. Now, in Outlook 2002, this worked perfectly. However, now in 2003, whenever (within VBA code only) an item is marked read (.UnRead = False), the message deletes. Not just moves to the Deleted Items folder, but it is gone. This email box processes hundreds of emails every week, and having to save them manually will hurt us.

Is anyone aware of this issue, or any way to work around this? The reason we mark it as read is so that we know which items were processed by the program, and which items will need manual intervention.

Any help would be appreciated!
Mar 15 '10 #1
1 1444
RedSon
5,000 Expert 4TB
Looks like a VB question... moved.
Mar 15 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Al Franz | last post by:
Just upgraded from Outlook 2002 to 2003 for my email reader. And emails I get from a PERL script now display the $eol written in PERL as a space instead of a carriage return and line feed as they...
7
by: Emil Frank | last post by:
Hi all, Via client side JavaScript I need to detect whether Outlook 2002 or 2003 is installed on a client machine. How can I do that using JavaScript? Thanks, Emil
3
by: Jyothi | last post by:
Hi All, Thanks for ur reply for my previous postings. I have a question. I wanted to show the outlook inbox in a window with minimal options like send,delete,reply,forward,replytoall,new...
4
by: Andy Bates | last post by:
Hi - I am developing an application that needs to automate Microsoft Outlook and I need to capture the ItemSend event. The PC I'm developing with has Outlook 2003 on; the problem I have is I...
4
by: Max | last post by:
Hi, I would like to have a button and a combo box with options to select various versions of Microsoft Outlook: 2002, 2003. The user selects the email client and clicks the button. The only...
8
by: info | last post by:
Don't any of you MVPs have a copy of this file -- msoutl.h-- it's referenced in lots of MS sample code.
4
by: Nathan Carroll | last post by:
Jay, Thanks for your help with that. Unfortunately it may be beyond my capacities because I am not certain what the guidance is implying when it mentions the private to public of the SinkHelper. ...
9
by: George McCullen | last post by:
I have an Outlook 2003 using Exchange Server 2003 Public Contacts Folder containing 20,000 Contacts. I am writing a VB .Net 2003 program that loops through all the contacts in a "for each oCt in...
3
by: Li Pang | last post by:
Hi, I wrote the following codes to read messages. They work fine for Outlook 2002 but fails for 2003. My felling it may be a bug of Outlook 2003. Anybody has experience on that? Thanks in...
1
by: dcd | last post by:
Hi all I'm using trying to get my app to read in all contacts in the contact folder of Outlook. I'm using the Outlook Security manager to stop the pop up warnings. Outlook version is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.