473,503 Members | 11,237 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(Optional PathName As String)

Dim oOutlook As Outlook.Application
Dim oNs As Outlook.NameSpace
Dim oFldr As Outlook.MAPIFolder
Dim oMessage As Object
Dim sPathName As String

On Error Resume Next

Set oOutlook = New Outlook.Application
Set oNs = oOutlook.GetNamespace("MAPI")
Set oFldr = oNs.GetDefaultFolder(olFolderInbox)
Set selected_Fldr = oFldr.Folders(List1.Text)

For Each oMessage In selected_Fldr.Items
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 1800

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

Similar topics

3
1647
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...
34
2374
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...
383
11779
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...
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`` ...
1
1858
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...
0
3712
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...
0
7194
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
7070
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
7267
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
7316
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
5566
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,...
1
4993
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...
0
3160
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...
0
1495
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 ...
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.