Welcome to OpenXML Developer Sign in | Join | Help

Custom UI Editor Tool

Click here to download the latest version of this tool updated to work with the RTM schemas.

The 2007 Microsoft Office System has an all-new "ribbon" interface which developers can customize in many ways. One of the ways to extend the ribbon is to insert an XML part into an Office Open XML document that defines your custom UI. With this approach, you can add new groups and controls, hide existing ribbon elements, and define callbacks to handlers that you write in managed code.

The XML part is not part of the Open XML format itself but could be added to any XML document by using a new namespace. The Open XML file formats are fully extensible, so applications can store information like workflow, metadata, custom XML, or even custom UI behaviors in a document that aren't necessarily tied to the document content.

Adding your custom-UI part to an Office Open XML document requires that you create a folder within the package, drop in your part, then define a relationship to the new part. For more information about how it all works, check out this technical artice or the "Extending the Office 2007 UI with a Custom Ribbon" screencast on this page.

custom UI editor

Attached to this post is a great utility for working with ribbon customizations stored in Office Open XML documents: Trang Luu's custom UI editor. It's a Windows tool that automates the process of putting your custom UI part into the package and defining a relationship to it: that's all handled by a single mouse click.

You open an existing document with File/Open, then enter your custom UI XML into the main edit box. (Click the image to the right for a full screen shot.) Other options include inserting icons for your custom control, generating callbacks, and validating your custom XML.

Install the tool and try it out, and if you have any questions about using it you can post them right here.

Comments

 

dmahugh said:

I noticed there's a great list of ribbonX developer resources on Jensen Harris's blog, courtesy of Office programmability guru Savraj Dhanjal.  Here's the link:

http://blogs.msdn.com/jensenh/archive/2006/05/25/606819.aspx
May 26, 2006 8:26 PM
 

Roger said:

hi... how are you, i try to make my own ribbon "tabs" and i try to make the example of the article (msdn), but nothing happends, i think of my problems is with the schemas, i used Office Beta 2, but i replace some schemas already. what´s the problem?? i can´t see any personalized "tab".

thanks in advance..
June 13, 2006 1:48 AM
 

keeron said:

Can you post the source code for this? It'd be interesting to see how you did this, as well as allow someone to extend it.

Thanks
June 16, 2006 10:50 PM
 

Roger said:

hi!, well
this is the code for .rels file (i rename .docx to .zip)
[code]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
 <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
 <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
 <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
 <Relationship Id="customUI" Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Target="customUI/customUI.xml"/>
</Relationships>
[/code]

and the first line for the customUI.xml file
[code]
<customUI xmlns="http://schemas.openxmlformats.org/officeDocument/2006/01/customui">
[/code]

Thanks
June 20, 2006 1:06 PM
 

NeilL said:

I have downloaded and used the Custom UI Editor but now have a question.

What I'm trying to do is migrate an word document level template to Word 2007. I've been able the current application toolbars and custom menu items to use the new Ribbon. My problem is I don't seem to be able to get my transparant images to properly appear in the ribbon UI. In the "old days" you specified a bitmap and mask to get transparancy. Since there does not seem to be any equivalent that you can specify in the getImage callback so I'm kind of stuck.

The last thing I was going to try was to add transparant png images to the template. I used the Custom UI Editor to do that (which worked just fine). Now to my questions.

1) Is there a way in the CustomUI XML to reference the png images that I just added?
2) If not, is there any way in VBA to retrieve these images and then return them as the result in a getImages callback
3) If not, is there any way to achieve a transparant image using a custom bitmap or png or ??? in the ribbon UI

Thanks and hope you can point me in the right direction as I've been looking for a solution for some time without any luck.

Neil
July 9, 2006 5:44 PM
 

Checho said:

hi im new here and what i like to know if this program is free??
November 12, 2007 10:15 AM
 

Big G said:

NeilL said: "If not, is there any way to achieve a transparent image..."

To do this, insert your picture, then right-click on the image and choose Format Picture. Have a play with Brightness and Contrast, and also Recolor options. I find 10% brightness and 10% contrast, and recoloring to Background Colour 2 Light gives a nice grey, transparent image.  

Cheers
September 8, 2008 12:46 AM
Anonymous comments are disabled