I am trying to programmatically change items of a recurrence (and make the exceptions).
The project is an Outlook 2010 AddIn.
I tried the following code but after a couple of saves the code exited at the calitm.Save()
command
extracted ="somelocation"
//that's a fancy way to iterate on a list of appointment items
for (int i = 0; i < filterAppointmentsToChangeLocation.RecordCount; i++)
{
int selrow = 1
var calitm = filterAppointmentsToChangeLocation.data[selrow].GetOlAppointment();
//this returns an appointmentitem that is associated with a form
//that contains the location property
calitm.UserProperties["location"].Value = extracted;
calitm.Save();
Marshal.ReleaseComObject(calitm);
}
Do you have any suggestions? Thnx for your time...