AddinBeginShutdown not firing when user closes Excel and decides not to save workbook changes

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

AddinBeginShutdown not firing when user closes Excel and decides not to save workbook changes
 
Adriana R


Guest


Hello!

Our Excel add-in has code that needs to run right before the Excel session is closed. This code is located in the AddinBeginShutdown event in the AddinModule class. We have noticed that this event does not fire when, right before closing, the user is prompted to save the workbook changes and he decides not to save those changes. If he saves the changes, the event fires.
The problem is that we need this code to run every time the session is closed, no matter if changes in the workbook are saved or not.
Why is AddinBeginShutdown not firing?
Is there a way to make sure AddinBeginShutdown is called every time before the session ends?
Or is there another add-in event that we can call instead of AddinBeginShutdown? We have tried with AddinFinalize, but the behavior is the same

Thanks
Posted 12 Oct, 2016 15:59:03 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hello Adriana,

I can't reproduce the issue in the latest build of Excel 2016 32bit.

What Excel build are you using? Will the issue go away if you update your Office?


Andrei Smolin
Add-in Express Team Leader
Posted 13 Oct, 2016 05:23:51 Top
Arh


Guest


Thanks Andrei!

I had Excel 2016 32bit (16.0.6701.1041) and after updating to Excel 2016 32bit (16.0.6925.1041), the event is now firing. Was this a known bug on Excel 2016?
Posted 13 Oct, 2016 10:51:17 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
I've never heard of it. But this behavior resembles a problem we reported at https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b291160f-c812-4889-bcea-ed901d1e085c/bug-with-the-workbookbeforeclose-event-in-excel-2016-how-to-reproduce?forum=exceldev.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Oct, 2016 13:47:48 Top