Reputation: 669
PropertyAccessor opa = outlookitem.PropertyAccessor;
opa.SetProperty("http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/Id", "100");
var val = opa.GetProperty("http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/Id");
When i try this on my own calendar (outlookitem) created in my calendar it works fine. But when i add a colleagues calendar to my Outlook at try it there i get the following exception, when calling GetProperty.
Any ideas?
An exception of type 'System.Runtime.InteropServices.COMException' occurred in *** but was not handled in user code
Additional information: The property "http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/Id" is unknown or cannot be found.
Upvotes: 1
Views: 659
Reputation: 669
had to save the item before a accessing the property. Not it works. Thanks
Upvotes: 1