Search code examples
c#exchangewebservicesappointment

c# Exchange Webservices delete appointment in public folder


I trying to delete an appointment in an public calendar.

ExchangeService Exchange = new ExchangeService();
Uri tempuri = new Uri(@"\\192.168.55.138");
Exchange.Url = tempuri;
Exchange.AutodiscoverUrl("tp@mailserver.de");

string appointmentID = "AAIARgAAAA...";
Appointment deleteAppointmennt = Appointment.Bind(Exchange, new ItemId(appointmentID));
deleteAppointmennt.Delete(DeleteMode.HardDelete);

But it doesn't work. Where is the problem?


Solution

  • try this out and let me know if it helps..

    deleteAppointmennt.Delete(DeleteMode.SoftDelete, SendCancellationsMode.SendToNone);