Detecting "no" choice in save prompt

Add-in Express™ Support Service
That's what is more important than anything else

Detecting "no" choice in save prompt
 
Joeri Sebrechts




Posts: 7
Joined: 2007-07-31
When the user closes a modified appointment, they get a prompt to save the appointment. If they click "no", is there a way to detect this?

The reason I need this is because while the appointment is open in my add-in certain actions are done in an external system, and if the user chooses "no", this means the actions should be rolled back.

An alternative solution I've considered is saving the appointment automatically when the external action is done. But what are the side-effects of saving programmatically? Is it possible that updates get sent to participants?
Posted 04 May, 2011 10:23:00 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Joeri,

The Outlook Object Model does not provide access to this Yes/No/Cancel dialog. I think you can try to handle the TAppointmentItem.OnClose event and check out the Saved property of the appointment item being closed.
Posted 04 May, 2011 11:16:07 Top
Joeri Sebrechts




Posts: 7
Joined: 2007-07-31
Thanks!

Checking whether the EntryID is empty in the OnClose event seems to work well.
Posted 05 May, 2011 08:52:30 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Joeri,

Thank you for posting your solution on our forum. Nice shot, btw!
Posted 05 May, 2011 10:07:05 Top