0
votes

I use the EWS Managed API to synchronize appointments with Exchange / Exchange Online. This works all good. Unfortunately there are problems with appointments that were created in Exchange by a meeting request. (IsMeeting = True) If I set the time zone (StartTimeZone, EndTimeZone) and try to save, comes the following error: "Set action is invalid for property." Other properties such as Start and End of the appointment can be changed and saved. For appointments that are not meetings, the time zone can be changed and saved easily.

The code looks like this:

Appointment = Appointment.Bind(Service, New ItemId("<ItemID>"))

Appointment.StartTimeZone = TimeZoneInfo.Local 'problem
Appointment.EndTimeZone = TimeZoneInfo.Local 'problem
Appointment.Start = DateTime.Parse("22.10.2014 11:00:00")
Appointment.End = DateTime.Parse("22.10.2014 12:00:00")

Appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendToNone) 'error

Can someone tell me how to change the time zone of a meeting, or what the cause of the error is?

1

1 Answers

0
votes

Exchange treates appointments & meetings in a similar fashion internally. The difference is that appointments doesnot have attendees. 1. In Update, you need to use SendToAllAndSaveCopy instead SendToNone. 2. No need to mention, IsMeetin. Instead use meeting.ItemClass = "IPM.Appointment"; 3. Mention Exchange version, RequestServerVersionValue.Version = ExchangeVersionType.Exchange2010_SP2; This is requuired as by default, it has exchange 2007. 4. For exchange 2010, you need mention start & end time zones, TimeZoneDefinitionType tz = new TimeZoneDefinitionType(); tz.Id = TimeZone.CurrentTimeZone.StandardName; meeting.StartTimeZone = tz; meeting.EndTimeZone = tz; Note: the code snippets are from working code useing ews proxy class