Search code examples
c#ms-wordvstooffice-addinsribbonx

Word VSTO Add-In C#: Why can't I move my add-in's tab?


I've developed 4 Word VSTO add-ins. Each manifests itself as a tab on the Word ribbon. I'm trying to position the Ribbon tab for each of the 4 to be to the left of the built-in Help tab. Other than that my 4 tabs appear to the right (after) the built-in Help tab, the 4 add-ins load and operate as expected.

I'm following the instructions in Microsoft's How to: Change the position of a tab on the ribbon. Specifically, I've done this:

  1. In the Ribbon Designer, select a custom tab (for this example, my QDU tab).

  2. In the Properties window, expand the ControlId property, and then make sure that the value of the ControlIdType property is set to Custom.

  3. In the Properties window, expand the Position property.

  4. Set the PositionType property to the appropriate value:

  5. BeforeOfficeId positions the group before a specified built-in tab.

  6. Set the OfficeId property to the control ID of a built-in tab. (My note: based on the spreadsheet obtained via step 7, the OfficeId of the built-in Help tab is TabHelp

  7. For a list of control IDs, see Office 2010 help files: Office fluent user interface control identifiers

See the screenshot below to see how one of my custom tabs is configured. None-the-less, this custom tab appears to the right (i.e., after, not before) the built-in Help tab at run-time.

What am I doing wrong?

enter image description here


Solution

  • Try using HelpTab instead of "TabHelp".

    Note that this ID is not listed in the document somehow (the one that is listed is for the backstage), so something cheesy may be happening here, like, maybe Microsoft does not want you to put your tab there (?), but I can't tell for sure. Or perhaps it is just forgotten and not omitted on purpose.