According to the docs, .FindAppointments() expands the recurrence of items:
Obtains a list of appointments by searching the contents of this folder and performing recurrence expansion for recurring appointments
It's not working:
ExchangeService service =ExchangeServiceUtilities.CreateExchangeService(s,u);DateTime now =DateTime.Now;CalendarView cv =newCalendarView(now, now);CalendarFolder cal =CalendarFolder.Bind(service,WellKnownFolderName.Calendar);FindItemsResults<Appointment> apps = cal.FindAppointments(cv);Trace.WriteLine(apps.TotalCount);foreach(Appointment a in apps){
a.Load();Trace.WriteLine(a.IsRecurring);Trace.WriteLine("Checking: "+ a.End.ToString()+" : "+ now);if(a.End> now){Trace.WriteLine("Setting Appointment for: "+ u.Id);ScheduleAppointment(a,u);}}
produces the following:
1TrueChecking:6/24/201310:00:00 PM :6/24/20139:41:12 PMSettingAppointmentfor:6dd36837d202bf28b0a8cfece47fb111cd0fec04
It's set to recur every half hour, so I should be seeing a lot more of them...