0
votes

Background: I have created a custom AddIn for Outlook that adds additional functionality to an AppointmentItem. There seems to be an issue however because when I open a new custom appointment and close it without any changes, it always asks me to save my changes. (Code is c#)

Save Dialog

Question: How to I capture the close event before it prompts the user to save. That way I can check the item, and determine if it should continue with the save, or close without saving.

Additional question: How does Outlook's AppointmentItem determine if it needs to save or not (Is there a dirty flag on the object, or a changed property collection?)

Thanks!

1

1 Answers

0
votes

Use Inspector.Close event. Item's inspector can be retrieved from the AppointmentItem.GetInspector property.

To check the item's dirty state, use the AppointmentItem.Saved property.