I created a C# class to handle some of missing Excel application level events such as : Workbook close, worksheet rename, worksheet delete, range name added, range name deleted, application activated, application deactivated.
Excel does offer a workbook closing event, but the user can cancel it. The workbook closed event fires when the workbook actually closes.
Usage is fairly straightforward :
ExcelApplicationEvents _appEvents = new ExcelApplicationEvents(_app, ApplicationEvents.WorkbookClosed); _appEvents.WorkbookClosed += _appEvents_WorkbookClosed;
Using the APIs, file information strings such as file description, product version, product name, and copyright information can be retrieved. The code was inspired by Randy Birch.
Tested with both 32 and 64 bit Office environments.