none
Two separate installation in one Ribbon (Word 2007 and onwards)? RRS feed

  • Question

  • Hi,

    I have created a Ribbon called 'TestRibbon' in Word 2007 and Word 2010. Now, I have separate installer which has got the same Ribbon name. Will Word automatically merge both or will it create two separate ribbons?

    Kindly suggest other solution to merger two separate installations in a single Ribbon.

    Thanks in advance!

    Monday, October 17, 2011 6:59 PM

Answers

  • Hi Atit Shah

    Yes, this should be possible, but you do need to use Ribbon XML, you cannot do this with the Ribbon Designer. The idQ would need to be the same for both, and it would be wise to also use the same value for the label, as otherwise it will show sometimes one label and sometimes the other (you can't control it - it will depend in which order the add-ins are loaded). That could be very confusing to the users.

    If you've been using the Ribbon Designer then you'll need to export it to Ribbon XML. That means you'd need to manually transfer all the code to callbacks.

    Note that I should move this question to the VSTO forum, if that's OK with you?


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Atit Shah Tuesday, October 18, 2011 7:02 PM
    Tuesday, October 18, 2011 3:18 PM
    Moderator

All replies

  • Hi AtitShah

    It would help if you would provide more detail about what kinds of "thing" these are. A Ribbon does not stand alone as something you can install. My guess would be that this is some kind of Add-in? VSTO or Shared?

    There's also no way to give a Ribbon a name. The Add-in project will have a designation. You can assign captions and IDs to Tab and other controls. I'm guessing that you have defined Ribbons that have a Tab with the same caption (and perhaps id)?

    If this is the case then no, they won't be merged. Office will treat each as a separate customization.

    It is possible to have multiple projects share Ribbon tabs and groups. The key to making this possible is to use the idQ attribute instead of the id attribute. And you must also add the same Namespace declaration to both Ribbon XML customizations, with a prefix alias. You then use the prefix alias when assigning the value to the idQ attribute.

    For more information, see the article http://msdn.microsoft.com/en-us/library/aa338202(office.12).aspx under the section "Two Ways to Customize the Fluent UI".


    Cindy Meister, VSTO/Word MVP
    Tuesday, October 18, 2011 7:07 AM
    Moderator
  • Thanks Cindy for the nice explanation.

    You guessed my query almost correct. As Word has got different tabs/menus like File, View, Review etc., we have a tab called 'Test' (hiding the exact name as it is org.) where we already have a toolbar under it. This is VSTO. 

    Now, we have another project but org. (tab name) is similar, we want both of them to make only one entry exposed and that is the tab/menu name. But both the toolbars should go under one.

    Kindly let me know if idQ attribute will help me in achieving this.


    Thanks, Atit Shah
    Tuesday, October 18, 2011 2:27 PM
  • Hi Atit Shah

    Yes, this should be possible, but you do need to use Ribbon XML, you cannot do this with the Ribbon Designer. The idQ would need to be the same for both, and it would be wise to also use the same value for the label, as otherwise it will show sometimes one label and sometimes the other (you can't control it - it will depend in which order the add-ins are loaded). That could be very confusing to the users.

    If you've been using the Ribbon Designer then you'll need to export it to Ribbon XML. That means you'd need to manually transfer all the code to callbacks.

    Note that I should move this question to the VSTO forum, if that's OK with you?


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Atit Shah Tuesday, October 18, 2011 7:02 PM
    Tuesday, October 18, 2011 3:18 PM
    Moderator
  • Excellent Cindy, thanks a lot for helping. Sure, you can move it to VSTO forum.
    Thanks, Atit Shah
    Tuesday, October 18, 2011 3:21 PM