Adding appointment to non default calendar
Hi Ken,
I guess it was not.
I deleted it and added a calendar sub folder to my default calendar and
all the code worked as expected.
Thanks for taking the time to help with my problem.
Cheers
Andy
Ken Slovak - [MVP - Outlook] wrote:
Are you positive the problem calendar is really in the same store (PST
file or Exchange mailbox) as the default calendar? It sounds to me like
it's in a different store.
If it's a different store than you can iterate the NameSpace.Folders
collection. Each top level folder there is a different store and you can
then iterate that store to find a specific folder. If you are using
Outlook 2007 it's even easier, any loaded store is in the Stores
collection.
To add an item to a specific folder instead of the default folder for
that type of item use the Folder.Items.Add method instead of CreateItem.
That always places items in the default folder for that type of item.
|