Ribbon customUI XML Editor

Yoursumbuddy’s Ribbon CustomUI Editor is an addin for adding, editing and validating your ribbon XML directly from Excel. It consists of a form in which you edit customUI and customUI14 XML text. This addin runs in Excel 2010 and later.

Download the customUI Editor addin

Summary

  • Load, modify and validate Ribbon XML in a single form
  • Edit workbook and addin ribbons
  • Can be used to just validate ribbon XML without loading a file
  • Handles customUI and customUI14 XML
  • Displays validation error messages and highlights invalid XML
  • Works on Excel workbooks and installed addins
  • You can cancel out of an operation and all previous XML is restored
  • The target file is backed up before any changes are made
  • The form is resizable and so is the font

ysb_customUI_editor_form

Installation

  • Download the zip file, which contains the ysb customUI editor and two xsd files.
  • Extract all three files to your Addins folder. The two XSD files are needed to enable XML validation.
  • Install the addin in Excel

For more information on installing addins see this Contextures page.

Using the ysb customUI editor

  • When you install the addin, a ribbon group will appear on Excel’s Developer tab.
  • developer tab ysb customUI editor group

  • Click Modify Ribbon XML to open the form.
  • You can then either:
    • Browse to a workbook or addin to work with its Ribbon XML, or
    • Simply enter some XML in either the customUI or customUI14 section
  • If you choose an installed addin, you will confirm that the editor can close the addin before importing its XML.
  • The XML, if any, will then be imported. If you only have one type of XML – customUI or customUI14 – the appropriate tab will be opened in the editor. If you have both types then the customUI one will be chosen. You can also add XML to create a brand new ribbon in a worbook that didn’t have one.
  • You can add, edit or delete either or both types of XML.
  • If you enter invalid XML the errors will be listed in the validation sections. See the next section for details.
  • The Commit Changes button is only enabled when:
    • you have browsed to a workbook or addin, and
    • made changes, and
    • have valid XML (or no XML) in both the customUI and customUI14 sections
  • Pressing Commit Changes writes the new XML back to the workbook or addin.
  • Once the changes are made to a workbook, you will be asked whether you want to open it. Installed addins will be reinstalled automatically.
  • After committing changes the form is closed. To make more changes, just open it again.

form_with tips

XML Validation
As you type or paste XML it’s automatically validated. All errors are listed in the validation section. You can click between the customUI and customUI14 tabs to see the validation for each.

As mentioned above, validation requires that you have the customUI.xsd and customUI14.xsd files in the same folder as this addin.

The line and column numbers of XML errors are listed. In case of fatal errors, such as mismatched brackets, the validation will just reference line 1, column 1. But for other errors, such as illegal ID characters or unrecognized types, the exact line and position will be listed.

Double-clicking anywhere in a validation error message selects the line with the error. You can also get there by pressing F5 or clicking the customUI or customUI14 tab with the error message selected.

form with highlighted error

Should Things Go Terribly Wrong
The first thing this tool does when you browse to a file is to back it up in the same folder. Should it crash, just find the file with “(download)” added to its extension, remove that part of the extension and you’ll have your original file back.

Running this Editor on Network Files
The short answer is “don’t.”

This process involves unzipping and zipping large files (an Excel workbook is actually a zip file). This can be slow over a network. If you do try it, be prepared to hit “Try Again” multiple times if a Windows dialog pops up. I’ve done this and it usually works. However you’re best off just copying the file to the local drive before processing it.

YouTube Video

If you’d like to see this info in 4.5 minutes of video, here you go:

Handy Ribbon Development Tips
If you are creating a new Ribbon but have one you want to base it on, use this tool to browse to the workbook with the existing XML, copy it to a text editor, and then hit the Cancel button. You can then browse to the target workbook and paste the XML from your text editor into this form and save the changes.

If you are new to Ribbon creation and don’t have any previous XML to work with, I strongly recommend downloading Andy Pope’s RibbonX Visual Designer. If I had to pick only one of our tools as a beginner, I’d pick his because you can see the ribbon layout, it gives you outlines for the VBA routines you’ll need, and it has an imageMSO selector, among other great features. I developed this one because it lets me quickly edit XML text, which Andy’s doesn’t.

Download the customUI Editor addin

Credits
I originally started working on this tool because I don’t have admin privileges at work, so wanted to create and addin to let me make and validate quick Ribbon edits. I quickly found Jan Karel Pieterse’s invaluable page on editing workbook XML. It gave me a starting point, and clearly let me figure out some of the key parts of this addin.

22 thoughts on “Ribbon customUI XML Editor

  1. Thanks very much, that is a great piece of work. Is there any change whatsoever to be able to modify ribbon of activeWorkbook? The part I really hate about ribbon customization is that I have to close the workbook 🙂

  2. Doug,
    I got interested so I downloaded it as well as activated it.
    Indeed a nice tool.

    Some input to make the tool better:
    – Add a help file to it.
    – Remove all 3D on the controls. With with we have a flat GUI and since the controls are old they are better viewed in flat status.
    – Use a small font size. It feels oversized and take up unproportional space
    Good luck and all the best,
    Dennis

  3. I am creating Powerpoint XML Ribbon. My Ribbon is working perfrectly and I also inserted custom images to the ribbon. My problem here is, my image folder is not inside powerpoint file, like the CustomUI folder. I want to embed the image folder inside powerpoint, so that there will be only one main file i.e. powerpoint.

    Can anyone please help me how to link this image folder in .rels file and is there any other way… please suggest

    Martin Nadar

  4. Hi Martin,
    That’s a great question for which I have no answer. I’ve never worked on a Powerpoint ribbon and a quick internet search didn’t turn up any answers. I’d ask in a forum like Stack Overflow. Good luck!

  5. Doug:

    Many thanks for this! I am working in a bank in NY and IT Security won’t let me download the Custom UI Editor available on the internet, such as Ron de Bruin’s website. Aside from having to get the administrative rights, I was told there is a EULA dated 2006 in the installation (as in “this software will stop running on March 2006”) which IT Security thinks remains valid. There is an updated Custom UI Editor (posted just as of February 2019) on GitHub by fernandreu which looks great–but I am also having to jump through hoops to get it. Not there yet, but this week maybe, after two months of pressing the issue.

    I found your add-in just today, was able to download and run it, and it works to get all the updates I have been wanting to make on the ribbon in my workbook. It’s terrific!

  6. This is a great addIn – thanks!

    One simple improvement would be to allow the code to open up powerpoint, and maybe word files as well as I imagine I’m not the only one that has custom ribbons in both applications (assuming here that the xml validation would be the same – pretty sure it would be).

    There is a workaround at the moment, which is to alter the file extension of a .pptm to a .xlsm, then use your editor, then alter the extension back. This works fine but is obviously a bit of a hassle.

    • Hi Ralph,

      I’m glad you like it. That’s a nice hack you figured out. I will keep your suggestion in mind. I’ve got a few, hopefully I’ll get to them one of these days!

  7. Hi,

    We just upgraded from Microsoft Office 2016 to Office 365 desktop edition.
    We have just now discovered our custom buttons and tabs do not work which have been made using the “Custom UI Editor”

    Do you know if all of this is compatible with Office 365?

  8. When I press “Commit Changes” I get the following dialog box appear:
    Compressed (zipped) Folders

    Please insert the last disk of te Multi-Volume set and click OK to continue

    Pressing with OK or Cancel simply brings up the same dialog box again an I ave to exit your editor without saving anything and losing the ML I have written.

Speak Your Mind

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

To post code, do this: <code> your vba here </code>