NetOfficeFw / NetOffice

🌌 Create add-ins and automation code for Microsoft Office applications.
MIT License
697 stars 143 forks source link

Event Hooking #257

Closed aganur-ahundov closed 4 years ago

aganur-ahundov commented 4 years ago

Hello! What I'm trying to do is create an emulation of the session for excel add-in application. I need to make an auto log out after session times out.

For WPF application it possible to do with WindowInteropHelper(Window window) class. In this way: var intrHelper = new WindowInteropHelper(window); var windowSpecificOSMessageListener = HwndSource.FromHwnd(intrHelper.Handle); windowSpecificOSMessageListener.AddHook(new HwndSourceHook(FilterResetTimerMessage));

But I have no find any ways to do it with NetOffice Api.

Any feature that I have missed? Obviously, I need to handle all users' actions like a mouse and keyboard clicks that he does in opened Excel.