tags:

views:

954

answers:

3

Does anyone know how to modify the content of the Excel ribbon at runtime with VSTO 2005SE? Not only update labels or dynamic menus, but also add or remove buttons, tabs, groups, drop downs etc. At runtime means not only at my add-in startup, but also during work with Excel.

A: 

If you use Visual Studio 2008, you have a great ribbon designer.

Do you want to have methods that is triggered by excel?

vimpyboy
I use Visual Studio 2005... I know how to create methods which are triggered by Excel. But I don't know how to add some new ribbon buttons after user action...
Falco Foxburr
+1  A: 

Irrespective of VS version, I don't think all that you want is actually possible with the current version of the RibbonX control. Specifically, there's no functionality for adding and removing. You can control visibility, though, so you can put everything in by default and make it visible or otherwise as needed.

Mike Woodhouse
A: 

I agree with Mike, working with the visibility callback on controls or groups is probably your best bet (that's what we are using).

The entire ribbon layout is loaded from an XML string. I don't know if it is possible to trigger a reload of the XML, which you could then customize to load different XML content.

Philipp Schmid