Show the code you're using. All of my code that iterates folders still works
identically in Outlook 2003 and even Outlook 2007.

Signature
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
>I have some VBA code in Access that reads mails. It works in Outlook 2000 -
> but now with Outlook 2003 it doesn't any more.
[quoted text clipped - 9 lines]
>
> Thanks
This is my code:
Public Sub fill_mail_table(folder As Outlook.MAPIFolder, no As Integer)
Dim mail As Savemaildata
Dim dbs As Database
Dim rst As Recordset
Dim to_list As String
Dim i As Integer
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("folder mails")
' get all mails in the folder
mail = Get_first_Mail(folder)
Do While Not OutlookEOF()
With rst
.AddNew
![mail index] = glngCurrentItem
!MessageID = mail.MessageID
!Subject = mail.Subject
!body = mail.body
!from = mail.from
!received = mail.received
!created = mail.CreateDate
!folder = no
to_list = ""
i = 0
While i < UBound(mail.Recipients)
i = i + 1
to_list = to_list & mail.Recipients(i) & ";"
Wend
!to = left(to_list, 255)
.update
End With
mail = Get_next_Mail(folder)
Loop
End Sub
the following procedures are called - and in the Get_first_Mail, the code
stops as
folder.Items.count shows 0.
Public Function Get_first_Mail(folder As Outlook.MAPIFolder) As Savemaildata
Dim tMailItem As Savemaildata
'Dim objitem As Outlook.MailItem 'changed 2001-03-29
Dim objitem As Object
glngCurrentItem = 0
glngMaxItems = 0
glngMaxItems = folder.Items.count
If glngMaxItems > 0 Then
glngCurrentItem = 1
Set objitem = folder.Items.Item(glngCurrentItem)
tMailItem = OutlookParseItem(objitem, gstrSaveFolder)
Get_first_Mail = tMailItem
End If
End Function
Public Function Get_next_Mail(folder As Outlook.MAPIFolder) As ABCmaildata
Dim tMailItem As Savemaildata
'Dim objitem As Outlook.MailItem 'changed 2001-03-29
Dim objitem As Object
glngCurrentItem = glngCurrentItem + 1
If Not OutlookEOF Then
Set objitem = folder.Items.Item(glngCurrentItem)
tMailItem = OutlookParseItem(objitem, gstrSaveFolder)
Get_next_Mail = tMailItem
End If
End Function
> Show the code you're using. All of my code that iterates folders still works
> identically in Outlook 2003 and even Outlook 2007.
[quoted text clipped - 12 lines]
> >
> > Thanks
Ken Slovak - [MVP - Outlook] - 27 Apr 2007 14:48 GMT
The code looks OK to me offhand. Have you stepped it and made sure that the
folder that's passed is the correct one and made sure everything else is OK
up to folder.items.count returning 0?

Signature
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
> This is my code:
>
[quoted text clipped - 70 lines]
> End If
> End Function