I need to subsribe to events for every new inspector that will be opend. And also want to invalidate the ribbon on every new Inspector.
Ther is an event that will be called for every new inspector:
Globals.ThisAddIn.Inspectors.NewInspector += (sender, explorer) => ribbon.Invalidate();
However this event will not be called when a new inspector is opend via the send to -> Mail recipient
from the windowsd explorer.
Another aproach was to register to the UI events in the ribbon. But those will also not called every time a new window is opend.
Is there is any way to reliable get notified for every new inspector?
NewInspector does not fire on purpose when a new message is created using Simple MAPI or fro ma mailto link.
You can have a timer that wakes up every couple seconds and checks if the Application.Inspectors
collection has any new inspectors you have not processed yet.