user1813147
user1813147

Reputation: 27

Is there a listing of XML MS Word 2007 ribbon control names?

I'd like to simplify my Word 2007 ribbon by hiding some of its tabs, groups, and controls. So I'm learning how to use XML to do this. The script I've built (with the help of Greg Maxey's excellent site, https://gregmaxey.com/word_tip_pages/customize_ribbon_main.html) checks out as well formed. I've saved it in Word's STARTUP directory. But when I open Word, I get a Custom UI runtime error saying "Error found in Custom UI XML of "C:\Users\wardw\AppData\Roaming\Microsoft\Word\STARTUP\Hide References and Mailing and Some Inserts.dotm": Line: 9 Column: 55 Error Code 0x80004005 Unknown Office control ID: Shapes

Clicking OK repeatedly gets the same message, except the control IDs are SmartArt, Chart, Cross-reference, and ClipArt. I got those names from the Insert tab groups Illustrations and Links, as shown in my script:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon>
    <tabs>
      <tab idMso="TabReferences" visible="false" />
      <tab idMso="TabMailings" visible="false" />
      <tab idMso="TabInsert"> 
         <group idMso="GroupInsertIllustrations">
             <control idMso="Shapes" visible="false" />
             <control idMso="SmartArt" visible="false" />
             <control idMso="Chart" visible="false" />
             <control idMso="Cross-reference" visible="false" />
             <control idMso="ClipArt" visible="false" />
          </group>
       </tab>
     </tabs>
  </ribbon>
</customUI>

If I'm assigning the wrong names, is there a listing of the correct names to use in XML scripts for hiding Word's ribbon items?

Upvotes: 2

Views: 1024

Answers (1)

Rich Michaels
Rich Michaels

Reputation: 1713

You can download the full package of Ribbon Control IDs from the links below. There are currently three packages, Office 2016, Office 2013, and Office 2010. It appears that a download link to a package of control Ids for Office 2007 has been deactivated and I haven’t found anything published at this time about Office 2019 control ids.

The download packages include Excel files by Office application and in each file are the Control Ids organized by ribbon tab and then within the sequence they appear within the tab.

Office 2016: https://www.microsoft.com/en-us/download/details.aspx?id=50745

Office 2013: https://www.microsoft.com/en-us/download/details.aspx?id=36798

Office 2010: https://www.microsoft.com/en-us/download/details.aspx?id=6627

Upvotes: 3

Related Questions