I am working on an Outlook add-in that adds a Form Region to IPM.Appointment message classes. When this region is showed, it will first add a few properties to the AppointmentItem.
Outlook.AppointmentItem appItem;
private void FormRegion_FormRegionShowing(object sender, System.EventArgs e)
{
try
{
appItem = (Outlook.AppointmentItem)this.OutlookItem;
appItem.ItemProperties.Add("CustomProperty", Outlook.OlUserPropertyType.olText);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
This works fine on my calendar, but if I try to use the addin with a delegate calendar that I have either Editor or Owner access to, it throws the following exception:
System.UnauthorizedAccessException: You don't have appropriate permission to perform this operation.
at Microsoft.Office.Interop.Outlook.Itemproperties.Add(String Name, OlUserPropertType Type, ObjectAddToFolderFields, Object DisplayFormat)
at ThisAddin.FormRegion.FormRegion_FormRegionShowing(Ovject sender,EventArgs e)
Any and all help is appreciated!
CustomProperty
doesn't already exist in the delegate calendar(s), does it? – Kevin Pope