Michael
Michael

Reputation: 1833

Excel Add In's Custom Ribbon Tab Will Not Display

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.

Upvotes: 6

Views: 16299

Answers (5)

Ashish Tripathi
Ashish Tripathi

Reputation: 666

I switched back to Visual Studio 2017 Community edition and it worked for me.

As an up-gradation process, I'd migrated my VSTO Add-Ins from VS 2017 to VS 2019. When I compiled my Add-Ins on VS 2019 Community Add-Ins worked well for MS Word and Outlook, but MS Excel was not showing the Add-In (Ribbon)

Tried many suggestions but did not work. After switching back to VS 2017 Community it started working well.

Upvotes: 0

Ashish Yadav
Ashish Yadav

Reputation: 1

Default tab's visible property value is False, set it to True.

Upvotes: 0

Mike Gledhill
Mike Gledhill

Reputation: 29213

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...

Upvotes: 11

user5099519
user5099519

Reputation:

I had this happen with using the xml ribbon developer tool. You have to add this code (or similar functionality into ThisAddIn.cs (or primary add in class)

    protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
    {
      return new Ribbon1();
    }

Upvotes: 3

Stephen Demanuele
Stephen Demanuele

Reputation: 21

After much pain, I found that the Position property of the RibbonGroup must be Default.

Upvotes: 2

Related Questions