Add Excel Ribbon Controls at Run Time (VSTO 2005SE)

Does anyone know how to change the contents of an Excel ribbon at runtime with VSTO 2005SE? Not only update labels or dynamic menus, but also add or remove buttons, tabs, groups, dropdowns, etc. Runtime means not only when the add-in is loaded, but also when working with Excel.

0


source to share


3 answers


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



The entire ribbon layout is loaded from an XML string. I don't know if it is possible to initiate an XML reload, which you can then configure to load other XML content.

+1


source


Regardless of the VS version, I don't think that everything you need is actually possible with the current version of the RibbonX * control. In particular, there are no functions for adding and removing. You can control the visibility, though, so you can put everything as default and make it visible or otherwise as needed.



* which was at the time of this writing - Excel / Office 2010 may have made a difference.

+2


source


If you're using Visual Studio 2008, you have a great ribbon designer.

Do you want to have methods that run with excel?

-1


source







All Articles