Hide Word 2007 Ribbon Tabs and Commands with Ribbon XML
Question details
Customize the Word 2007 Ribbon to hide the View tab or a built-in command.

- Product
- Microsoft Word 2007
- Device & OS
- not provided
- Scenario
- A user wants to control which Ribbon tabs and commands appear in a document or template.
- Observed behavior
- Standard VBA alone does not provide full control over the visibility of Word 2007 Ribbon tabs and commands.
Identify the document or template that should carry the customization and install a RibbonX editor that supports Office 2007 custom UI parts. Check the built-in control IDs in Microsoft's Office 2007 control identifier documentation before editing.
Hide the View tab with Office 2007 Ribbon XML
Use this approach to hide a built-in tab for a specific document or template without hiding the entire Ribbon.
Word 2007 uses RibbonX XML to define Ribbon changes. VBA can support callbacks for dynamic behavior, but it does not by itself define the Ribbon customization.
The Office 2007 XML namespace includes the version number 2006/01; use that namespace for Word 2007 rather than the later Office 2010 namespace.
Close the target document in Word, then open the document or template in an Office RibbonX editor.
Use the editor's Insert menu to add an Office 2007 Custom UI part. If the file already has one, edit that part instead of adding a duplicate.
Enter or merge this XML into the custom UI part: <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"><ribbon><tabs><tab idMso="TabView" visible="false"/></tabs></ribbon></customUI>.
Save the file in the RibbonX editor, then reopen it in Word 2007 and check that the View tab is hidden while the other tabs remain available.

Hide the Show/Hide command with Ribbon XML
Use this approach when you want to remove the formatting marks command without hiding its entire tab.
Work with Word documents in WPS Writer
WPS Writer is a free, lightweight alternative with a familiar Ribbon-style interface. Open compatible Word files and continue editing with an easy transition, although WPS does not fix Microsoft Word's Ribbon XML customization.

Frequently Asked Questions
Can I hide the View tab without hiding the whole Ribbon?
Yes. In the Office 2007 custom UI XML, set visible="false" on the built-in TabView tab. The other tabs can remain visible.
Can VBA alone hide a built-in Word 2007 Ribbon tab?
Standard VBA alone cannot fully define Word 2007 Ribbon customizations. Use Ribbon XML to define the tab or control, and use VBA callbacks if you need dynamic behavior.
What do the numbers in the Ribbon XML namespace mean?
The 2006/01 portion identifies the Office 2007 custom UI namespace: http://schemas.microsoft.com/office/2006/01/customui. Later Office versions also support a different namespace, which is not the one to use for a Word 2007 customization.
Will hiding Show/Hide prevent formatting marks from being displayed?
Hiding the Show/Hide button removes that Ribbon control; it does not necessarily prevent formatting marks from being displayed or changed through other Word settings or shortcuts.
Does Ribbon XML change every document in Word?
Not automatically. The customization is loaded with the document, template, or add-in that contains the custom UI part. Test it by reopening that file in Word.




