1
votes

If I create a new 'Excel 2013 and 2016 VSTO Add-in' Project from the File/New Project... menu, and then Project/Add New Item... -> Ribbon (Visual Designer), everything works fine: when I launch the App I have my Ribbon showing in Excel.

But if I first create a 'Blank Solution', and then add an Excel VSTO Project from the File/Add/New Project...: if I add a Ribbon item in the project it does not show in Excel.

That must mean I have to set a reference to the Ribbon somewhere in the Solution properties, but I could not find where. Any ideas?

1
Been a while, but do you have anything in the Ribbon_Load event of the xxxRibon.cs file? I have done something like: Globals.ThisAddIn.CustomTaskPanes.Add(... - Crowcoder
I created two Excel VSTO projects within the same Solution. One was created at the same time as the Solution (i.e. I did not start from a Blank Solution), and then added the second VSTO project. The ribbon from the first VSTO project loads, but not the second. The code within the Ribbon.vb files is identical in both. - Ama
I would do a comparison with something like WinMerge or Beyond Compare to see what the difference is. - Chris
I started to look into Beyond Compare byt then Eduardo came up with the answer. Interesting technique however, will definitely keep it in my mind. - Ama

1 Answers

2
votes

Open ribbon in Design view (where do you add bottons, labels, etc.), select ribbon and check in properties panel if RibbonType = Microsoft.Excel.Workbook

hope help you