Default MAPI Folder is missing items

G

Guest

My Outlook 2002 Calendar has 6 items in the folder. If I
use my Session object and use GetDefaultFolder using the
CDO Default Calendar Folder when I loop through the
folder it only see's 5 items.

However if I use my Session and use the GetFolder call
and pass in my Calendar ID when I loop through the folder
it see's all 6 items. However I can't use the
MessageItem to get the information I need.

How I get the GetDefaultFolder to see all the entries in
my Calendar Folder?


Dim mySession as MAPI.Session
Dim CalFolder as MAPI.Folder
Dim CalMessages as MAPI.Messages

'^^^ Init session and login

Set CalFolder = mySession.GetDefaultFolder
(CdoDefaultFolderCalendar)
Set CalMessages = CalFolder.Messages

For each item in CalMessages
Debug.print item.Subject
next
'^^^ Only 5 items are printed


Set CalFolder = mySession.GetFolder("FOLDERID")
Set CalMessages = CalFolder.Messages

For each item in CalMessages
Debug.print item.Subject
next
'^^^ All 6 items are printed but it's a Message Object
not an Appointment Object
 
K

Ken Slovak - [MVP - Outlook]

What is different about that 6th item? What's its MessageClass for
instance?
 
G

Guest

It's Class is 3.
It is a recurring item.

When I loop through all the items it says that all their
class is 3. Which I belive it is giving me this result
because of the way the folder is retrived. I do have the
item in .msg format if it would help us.
 
G

Guest

It's Class is 3.
It is a recurring item.

When I loop through all the items it says that all their
class is 3. Which I belive it is giving me this result
because of the way the folder is retrived. I do have the
item in .msg format if it would help us.
 
G

Guest

I saved the item as a .MSG and then opened it up. It has
two attachments that refer to the exceptions for this
item. When I double click on one of those exception
attachments I get the error "The data for the exception
to the recurring appointment is damaged."

How can I correct this problem and how can I get my app
to see these items as a damaged and log it some way?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top