Search code examples
c#outlookribbon

Outlook RibbonXML SelectionChange event not raised creating new mail


I am working on a Ribbon XML addin for Outlook. I am having a problem resetting my toggle button when user creates new mail. It seems this event handler SelectionChange is not called when creating a new mail.

_application.ActiveExplorer().SelectionChange += MainRibbon_SelectionChange;

private void MainRibbon_SelectionChange()
{
  _ribbon.Invalidate();
}

What event should i raise to trigger the MainRibbon_SelectionChange when ussr creates new mail message?

THanks so mmuch!


Solution

  • Use Explorer.InlineResponse event and Application.Inspectors.NewInspector in case of a new inspector.