I have a legacy Office 2007 Add-In where the user32.dll SetWindowsHookEx based custom function is used to intercept CTRL+S key press event on a thread and do a customised file save. The function works fine in Windows7 but does not in Office 2016 and Windows10 environment. I don't know how to fix this bug.
So, I tried another approach to intercept CTRL+S. I used ThisAddIn.Application.OnKey("^{s}", "MySaveMethod") function with a macro programmatically imported into an active workbook. This approach works. But, the company's Group Policy requires to sign all macros added to a workbook and it seems impossible to sign a macro programmatically.
I wonder what other developers do to catch key press event or develop a keyboard shortcut in their Excel 2010/2013/2016 Add-In's? Any ideas are much appreciated.
Thanks
