To detect if an appointment in the OnAppointmentSend event is a cancellation in your Outlook add-in, you can utilize the MeetingRequest.IsCancelled property from the Exchange Web Services (EWS) API. This property indicates whether the appointment has been canceled.
Here’s how you can check for a cancellation:
- When handling the
OnAppointmentSendevent, you can retrieve the appointment details using the EWS API. - Check the
IsCancelledproperty of theMeetingRequestobject. If it returnstrue, then the appointment is a cancellation.
This approach allows you to differentiate between a new meeting, an updated meeting, and a cancellation based on the state of the appointment when the event is triggered.
For more detailed information, you can refer to the EWS API documentation regarding the MeetingRequest.IsCancelled property.
References: