I'm using VBA to create a new calendar in Outlook and populate it with dates from an Access recordset.
Problem: I want to create a new calendar, which works just fine with folders.add method. However, once it's been created already I want to be able to trap the error and resume with code that addresses the existing calendar. When I step through I get a different error # every time for the same situation--how can this be?
Another problem: I did a workaround for the first, which was to take the existing calendar and try to iterate through the appointment items and remove them using a FOR...NEXT loop. This works fine except that the indices of the items don't appear to be in straight numerical sequence (not to mention that they also begin with #1!!!).
I'll stop and the code and get an item count in the debug window, then continue stepping through. It deletes item #1 and #2 but I get an "index outside of array" error when it gets to #3 (item count was three). Is it possible that the items in this collection are not sequentially numbered?
I haven't found good documentation on the Outlook object model yet. Any hints for good sources?
Thanks
Problem: I want to create a new calendar, which works just fine with folders.add method. However, once it's been created already I want to be able to trap the error and resume with code that addresses the existing calendar. When I step through I get a different error # every time for the same situation--how can this be?
Another problem: I did a workaround for the first, which was to take the existing calendar and try to iterate through the appointment items and remove them using a FOR...NEXT loop. This works fine except that the indices of the items don't appear to be in straight numerical sequence (not to mention that they also begin with #1!!!).
I'll stop and the code and get an item count in the debug window, then continue stepping through. It deletes item #1 and #2 but I get an "index outside of array" error when it gets to #3 (item count was three). Is it possible that the items in this collection are not sequentially numbered?
I haven't found good documentation on the Outlook object model yet. Any hints for good sources?
Thanks