views:

26

answers:

0

I'm working on outlook 2007 VSTO Addin.I have added a Ribbon with a button. I am trying to raise an event on button click.On NewInspector event of Application.Inspectors collection I should be able to hook on to this ribbon event in the Presenter.

The questions is how to get hold of Ribbon of Inspector opened. I tried Globals.Ribbons.MyRibbon to do so.Strangely it works only for the first inspector. I also tried Globals.Ribbons[inspector].MyRibbon.

Looks like when NewInspector is created the Ribbons Collection has 0 Items and Ribbon load happen only after NewInspector event handler is executed.

Is there any event to know when a ribbon loads OR Is there any alternative way ,where i can keep the business logic in Presenter instead of having it in ribbon view.