C# – Excel Add In’s Custom Ribbon Tab Will Not Display

add-incexcelribbonvsto

I've created an application level add-in for Excel to automate some tasks. I used the VS2012 template Visual C# > Office > 2010 > Excel 2010 Add-In.

Rather than having an action pane open every time Excel does, I've opted to create a custom ribbon tab following these instructions:

http://msdn.microsoft.com/en-us/library/vstudio/bb386104.aspx

However, when I build my project, the tab does not display. I have verified the add-in is loading, and all of its features function properly, except the Ribbon. I created a simple form to test this, which loads as expected.

I then tried creating an Excel 2010 Workbook project. After adding the Ribbon (using the same steps as before) and building the project, it simply works; the ribbon tab appears as expected.

I've tried overriding ThisAddIn.CreateRibbonExtensibilityObject() to return my ribbon object, created via Globals.Factory.GetRibbonFactory().CreateRibbonManager. Again, no dice.

I'm at a loss now.

Best Answer

I also had this problem, where my VSTO ribbon wasn't being displayed.

Here's my solution, using Excel 2013 and VS2015.

What you need to do is:

  • Open the Ribbon Designer window
  • Select the RibbonTab object
  • In the "Properties" window, expand "ControlId" branch, and change the ControlIdType from "Office" to "Custom"

enter image description here

Ridiculous, hey ?

But, strangely, it works...

Related Topic