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
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