Custom-UI: Force Developer-Tab to be visible

374 Views Asked by At

I have a MS-Word template where the user sometimes will have to edit content controls.

Therefore I would like to force the developer tab to be visible whenever a document based on this template is opened.

I changed the CustomUI:

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon>
        <tabs>
            <tab idMso="TabDeveloper" visible="true" />
        </tabs>
    </ribbon>
</customUI>

No error is thrown when the document is opened - but the Developer tab isn't visible.

Any thing else I have to consider, to force the tab to be visible?

(Vice versa works: hiding a visible Developer-Tab by setting visible to false) (There is no VBA attached to the document.)

2

There are 2 best solutions below

0
On

OK - sometimes a short break helps:

I am adding a custom tab containing the relevant buttons from the developer tab. Plus: renaming them :-)

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon>
        <tabs>
            <tab id="Abnahme" label="Abnahmedokument">
                <group id="x" label="Eingabefelder">
                   <button idMso="ContentControlText" label="neues Eingabefeld" size="large"/>
                   <button idMso="ControlProperties" label="Eingabefeld bearbeiten"  size="large"/>
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>
1
On

I know of no method other than user education.

You could, in your distribution template, add your own duplicate tab or a tab that has the controls for Content Controls. Better practice is probably to put the Content Control tools on your own additional tab and ignore the Developer Tab.

See also Hide/Show all tabs on Ribbon except Custom tabs which also says there is no method available via VBA.


The following caveat is for someone finding your question in a web search and thinking about using the Word.OfficeUI file and finding this question in a web search. It does not appear that you are doing that.

For customization distribution, the UI editor in Word is a very poor tool. It is intended for personal use.

The Word.OfficeUI file produced by Word will overwrite any user customizations including QAT customizations. Placing that on a user's computer is mean and dictatorial just like overwriting the Normal template. It is a bad practice.

For distribution, you should be editing the XML of a global template. Likewise, such a template is the best method of distributing other user interface customizations like macros and building blocks. The methods for doing this are explored in the book RibbonX: Customizing the Ribbon User Interface and on Greg Maxey's page: Customize the Office Ribbon: It doesn't take rocket science.