none
Why does my custom addin ribbon merge with an existing addin ribbon? RRS feed

  • Question

  • I've developed a Word addin that installs and runs fine.  Unfortunately the ribbon I developed also contains menu commands from another addin.  Why?  How can I prevent this?

     

    Here is a picture of the problem:

     

    http://flic.kr/p/9LjmyZ

     

     

     


    adam
    Monday, May 23, 2011 8:29 PM

Answers

  • Hi Adam

    The Add-ins tab is a built-in tab and designed to be "shared": by any old toolbars or menus (CommandBars objects) that are around, or any controls added by any Add-in to the Add-ins Tab.

    It doesn't matter whether you created your own Ribbon, what matters is whether you create your own TAB in that Ribbon, or whether you work in the Add-ins tab.

    If you're  using the Ribbon Designer instead of Ribbon XML, VSTO will offer the Add-ins tab as the default. The philosophy behind the Ribbon's design is that the user will find "all" custom tools in that tab. if you don't want to share a tab, then you have to explicitly add a new one to the Ribbon Designer and put your controls in it.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by adamhodge Tuesday, May 24, 2011 2:36 PM
    Tuesday, May 24, 2011 2:22 PM
    Moderator

All replies

  • Hi Adam

    This will happen (and is by design) if you work with a built-in Ribbon tab. You need to add your own, custom Tab in order for them to "belong" exclusively to your add-in.


    Cindy Meister, VSTO/Word MVP
    Tuesday, May 24, 2011 5:20 AM
    Moderator
  • Ok, I get what you're saying.  However, I did create my own ribbon in VSTO 2010.  Is the problem my addin or the other one?  The other addin might be compiled as an older 2003 addin - but I'm checking on that.
    adam
    Tuesday, May 24, 2011 2:03 PM
  • Hi Adam

    The Add-ins tab is a built-in tab and designed to be "shared": by any old toolbars or menus (CommandBars objects) that are around, or any controls added by any Add-in to the Add-ins Tab.

    It doesn't matter whether you created your own Ribbon, what matters is whether you create your own TAB in that Ribbon, or whether you work in the Add-ins tab.

    If you're  using the Ribbon Designer instead of Ribbon XML, VSTO will offer the Add-ins tab as the default. The philosophy behind the Ribbon's design is that the user will find "all" custom tools in that tab. if you don't want to share a tab, then you have to explicitly add a new one to the Ribbon Designer and put your controls in it.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by adamhodge Tuesday, May 24, 2011 2:36 PM
    Tuesday, May 24, 2011 2:22 PM
    Moderator
  • AH! I see it now. Beautiful answer. Thank you. adam
    adam
    Tuesday, May 24, 2011 2:35 PM