473,796 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Outlook 2002 to 2003 Issue

seraieis
60 New Member
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 1462
RedSon
5,000 Recognized Expert Expert
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
2486
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 did in Outlook 2002. What is going on? Should this code be something other then $eol in PERL to satisfy a majority of email readers?
7
1913
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
4538
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 message. how do i achieve that. Is there any option in C# where i can perform this using the native support of .NET framework?
4
10081
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 need to make the code work with Outlook XP (i.e. 2002)! The code to add the event is currently: oOutlook.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler
4
5109
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 things happening will be: a new email is created and some text is placed in the body, then the email window is displayed. The user can close the window or select some recipients and send the message. I would like some info on how to do this correctly....
8
3934
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
1352
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. When I open the modified dll (il) I see what seem to be classes, and fields and methods. In the classes area all sinkhelpers are public before any edits. In the fields and methods there are lines with sinkhelper and they begin with .class and...
9
3092
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 oItems" loop. After about 250 contacts, the program gives an InvalidCastException Error on the for each loop. I notice that Outlook's memory keeps increasing (using the task manager) until it reaches around 20,000K. When I run the program a second...
3
4958
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 advance Dim oOutlook As Outlook.Application Dim oNS As Outlook.NameSpace Dim oStores As Outlook.Folders Dim oStore As Outlook.MAPIFolder
1
4869
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 2002(10.2627.2625) I can create a contact in Outlook and I can use it to send an email. It's just the getting the contacts list that doesn't work. The thing is it also works on my dev machine but not on the users machine. The code I'm using: SecurityManager =...
0
9673
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
9524
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
10449
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10217
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
10003
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
9047
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...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
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
5568
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.