Find the Id of a Ribbon button in SharePoint

When you are trying to customize the SharePoint Ribbon you might want to hide a few of the buttons. There are a few ways to do that, including obviously css manipulation. The recommended way is to deploy a custom action element with the following details.

<Elements xmlns="">
          Location="Ribbon.XXX.YYY.ZZZ" />

The text XXX.YYY.ZZZ symbolizes the name of the button on the ribbon. Most of the buttons have standard names, and can be guest, like the button for creating a new folder in a documents library – “Ribbon.Documents.New.NewFolder”. There are some buttons though, that are a bit different.

A good example is the button for editing with Infopath – “Ribbon.List.CustomizeList.Controls.btnCustomizeList2”. When looking for button names like this you may end up looking up the CMDUI.XML that is located in the SharePoint hive folder on the path: TEMPLATE\GLOBAL\XML. You can find a lot of the button names there, but unfortunately not all.

The solution to this problem is to look up the button id on the page. The id that we are looking for will be used there for the id of the link tag.

You could look up the button id in a few different ways, but probably the easiest would be to an elements inspector tool. Most modern browsers have this kind of tool automatically available in their developer tool suites.

With the inspector tool you can simply point to an element on the page, and see its properties. In the example below I am looking up the Infopath button.

Looking up the ribbon button id

Looking up the ribbon button id

Leave a Reply

Your email address will not be published. Required fields are marked *

nine − 7 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>