none
Hide Workbook Ribbon on Load RRS feed

  • Question

  • I created a workbook ribbon tab using the Ribbon designer in VS2010 for Office 2010 and everything works fine.  Now, I was asked to hide this custom ribbon tab until the right workbook is loaded.  Basically I need to be able to hide or show the ribbon tab depending on the name of the workbook that is activated.  I can't find any way to do this, it is kind of context sensitive tab.  The ribbon load event is fired before a workbook is activated and at the addin startup event I don't know how to access the custom ribbon.  Please point me in the right direction or better to a sample.  Thanks in advance.
    • Moved by George123345 Tuesday, December 15, 2015 9:17 AM Office DEV issue
    Monday, December 14, 2015 5:56 AM

Answers

  • Hi HJohn,

    The tab1(ControlId=TabAddIns) refer in your code is a little special than other custom tab because all of the add-ins share the same tab by default.

    If you want to hide the tab at run time, we can create a custom tab instead of use the build-in tab.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 16, 2015 6:06 AM
    Moderator

All replies