473,804 Members | 3,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I don't know why but sometimes, this software 'forget' one or a few mails ...

el
Hello,

I wrote a tool which read an outlook folder and save the mails to the hard
disk (in .msg files)

Here below one of the main sub of my tool.

I don't know why but sometimes, this software 'forget' one or a few mails
....
For instance : 24 mails in the folder but only 22 are saved.

Any idea ?

Thanks a lot
_______________ _______________ _______________ _______________ ____________

Public Sub save_mails(Opti onal PathName As String)

Dim oOutlook As Outlook.Applica tion
Dim oNs As Outlook.NameSpa ce
Dim oFldr As Outlook.MAPIFol der
Dim oMessage As Object
Dim sPathName As String

On Error Resume Next

Set oOutlook = New Outlook.Applica tion
Set oNs = oOutlook.GetNam espace("MAPI")
Set oFldr = oNs.GetDefaultF older(olFolderI nbox)
Set selected_Fldr = oFldr.Folders(L ist1.Text)

For Each oMessage In selected_Fldr.I tems
oMessage.SaveAs sPathName & nomfichier$ & ".msg", olMSG
Next

Set oMessage = Nothing
Set oFldr = Nothing
Set oNs = Nothing
Set oOutlook = Nothing
End Sub

Jul 17 '05 #1
0 1816

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1666
by: Michael | last post by:
I have broken PythonWin and I don't know how or why. It worked great until recently. I have installed / removed several apps since it worked last. I could have a virus unknown to my antivirus program, I guess. I'm stumped. ---------- The Symptoms --------------------- Here's what happens. I fire up PythonWin without opening a python file. Everything looks good - the interactive window is at the bottom of the
34
2419
by: Justin Timberlake | last post by:
I was thinking about all those /Indian Outsourcing/ companies getting those .Net shops set up. 0. Nobody uses .NET in the real world, it's all java. 1. MSFT is about to collapse as witnessed by Bill Gate$ selling his stock in droves. 2. Linux marketshare is eating up windos. So when all is said and done, the wogs won't have much left for them, will they?
383
12283
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a poor man's DBMS, a broken email server and various other /application/ servers to try and crack the Internet and IS markets. In the case where they didn't spend their own money to get companies to
2
147
by: Hank | last post by:
Apology for the previous offensive title~~ :) Thanks, Rintsch, Arnaud and Daniel, for replying so soon. I redid the experiment. What following is the record - ``starting python`` # == Windows Task Manager: Python.exe *4,076 *K memory-usage ==
1
1870
by: Alec MacLean | last post by:
Hi, I have a number of VB.NET apps, where sometimes the mouse click doesn't fire a button's event handler. These were written in various Visual Studio IDE's; 2003, 2005 and 2008 (that is, it doesn't seem to be a Studio-specific issue, or framework-specific issue). It also doesn't seem to be consist - sometimes the same button will operate perfectly in response to the mouse where before it failed. The buttons always work in response to...
0
3729
by: Winfried Wille | last post by:
Hallo, i have a wpf project using nt 3.5sp1 and the ctp from the datagrid(downloaded thewpftoolkit from codeplex.com), silverlight final downloads are installed to. Wpf datagrid ctp cell selection changed causes sometimes no CurrentChanged event - cells are in different rows. If you click in the rowheader, the CurrentChanged event always occur, the CurrentChanging event exhibits the same behavior. A Textbox bind to the CurrentItem of ...
0
9706
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
9584
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
10583
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...
1
10323
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
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...
1
7622
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
6854
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
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.