wordpress hit counter
Custom UI Editor Tool - OpenXML Developer - Blog - OpenXML Developer
Goodbye and Hello

OpenXmlDeveloper.org is Shutting Down

There is a time for all good things to come to an end, and the time has come to shut down OpenXmlDeveloper.org.

Screen-casts and blog posts: Content on OpenXmlDeveloper.org will be moving to EricWhite.com.

Forums: We are moving the forums to EricWhite.com and StackOverflow.com. Please do not post in the forums on OpenXmlDeveloper.org. Instead, please post in the forums at EricWhite.com or at StackOverflow.com.

Please see this blog post for more information about my plans moving forward.  Cheers, Eric

Custom UI Editor Tool

Custom UI Editor Tool

Rate This
  • Comments 66

LASTEST VERSION OF THE CUSTOM UI EDITOR - updated to work with the RTM build of Office 2007 and Beta build of Office 2010 - ATTACHED TO THIS POST

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.

Attachment: OfficeCustomUIEditorSetup.zip
  • Since RTM release the Editor doesn't recognize the namespace correctly for Office 2010 customizations. It should be
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" >
    So checking whether the Custom XML is well-formed does not work. Since there does not appear to be any updated documentation available about the correct construction of all the XML Parts, as there was for 2007 (the three part series, for example) it becomes very difficult to use this tool for customizations if it's not going to be updated to RTM standard. Thank you.
  • I installed the updated Editor today (msi file dated today, 9:15 am) and received an error when trying to insert any of the sample XML --

    "Unhandled exception has occurred in your application.  If you click Continue, the application will ignore this error and attempt to continue.  If you click Quit, the application will close immediately."

         "Object reference not set to an instance of an object."

    When I click Continue, nothing is inserted.  I am able to open files.
    FYI, I just installed VS2010Pro Trial version.

    Thank you.
  • You know, additionally, the UI Editor I installed doesn't look like your screenshot -- it says "Insert" instead of "Sample" and Office 2007 UI is greyed out on the Insert menu, even though this computer only has Office 2007.  I've also looked back at the earliest version I have and it, too, says "Insert"

    Where can I get the Custom UI Editor you have illustrated here?

    Thank you.
  • Well, OK, I've found a whole lot of other stuff scattered around the internet and it looks as if I do have the latest, and the latest says "Insert" rather than "Sample".  And the reason I was getting an error seemed to be because I didn't have a project loaded.

    The reason Office 2007 UI is greyed is because I already had a customUI module in my project.  Clicking Office 2010 UI added a customUI14 module which will presumable allow me to create the code for 2010 within the same project.

    Has anyone written any documentation about this whole subject?  How cool would that be?  I find that searching on this subject scatters me all over the internet.  And I'm easily distracted...

    Best, kdock
  • Como lo descargo
  • Is anyone else having this issue?  When my XML code is long enough that it doesn't fit in the window and the scroll bar appears, the display becomes "jittery" and whatever line I'm working on is forced to the bottom of the window.  With each letter I type, the text hops slightly up and down in the window.

    Thanks, kdock
  • I am trying to do something similar to what DannyBones referred to "First, I don't even understand what XML is.  I am just trying to find a way to create icons that are assigned to macros", but in my case - I am trying to assign permanent custom icons to the Excel 2010 "Quick Access Toolbar" that are assigned to a macro I have created in the personal.xls file so I don't want the custom icons to disappear when I close out any given workbook.  Any help would be appreciated.

    Thanks,
    Chet
  • First of all, thank you for this tool. It really makes Office UI development far easier than it would otherwise be.

    However, I'm sadden to see that there is some basic functionality that is missing from it, as well as what seem to be a bugs.

    Missing functions-
      - Undo. Ctrl+Z doesn't work.
      - Smart tabbing. New lines wrap around to the very beginning of the text field, instead of start at the tab position of the line preceeding (a lot like this text box).
      (Ideally, new lines would start here.) This makes for very messy code that must be manually tabbed in order to be aligned.

    Bugs-
      - The text field automatically scrolls to position the cursor at the bottom of the field when there is more than one page of code.
      - The above bug seems to be triggered when every a key is pressed. This can make it difficult to keep an eye on what is being typed because the page is jerking to the bottom with every keystroke.

    Again, thank you for this tool. My only aim with these comments is to help you make it even better.
  • I get "attribute not defined" when trying to use getImageMso for a toggleButton control, but the documentation on MSDN says it is defined. Is this a bug?
  • The above fix made everything work.

    Under 'Insert' choose 'Office 2007 Custom UI Part'. You'll see it appear in the leftside hierarchy with the proper 'customUI.xml' name. Copy the code from the 'customUI14.xml' one, and then delete the 'customUI14.xml' one. Save it, and when you open Excel, the tab appears like magic.

    Dirus said:
    The new tool did not work for me either, but I found a workaround.  When you add a new UI part you will notice that it is named customUI14.xml on the left hand side.  If you were using the schema with dates 2006/01 you will  need to add another UI part and it will be named customUI.xml.  I removed the initial UI part and used the correctly named customUI.xml one and I was fine going forward.
    January 6, 2010 11:05 AM
  • Buy cheap Abelssoft WashAndGo 2010 12 Oem Software Version
    Buy cheap ACAPsoft Volt 1.400 Oem Software Version
    Buy cheap Microsoft Business Contact Manager for Outlook 2010 Oem Software Version
    Buy cheap Adobe After Effects CS4 Oem Software Version
    Buy cheap IDM Internet Download Manager 6.0.3 Oem Software Version
     
    <a href="http://vefounio.blog.com/?p=17">online cheap Multimedia Encoding in Kansas City</a>
  • whoah this weblog is wonderful i love studying your posts. Keep up the great paintings! You know, many persons are looking round for this information, you can help them greatly.
  • Anyone having issues inserting ico files?  When I try to add an ico file with just one frame there is no problem.  However, if I try to add an ico with more than one frame then I get "A generic error occurred in GDI+".  This is making it tough to deal with the tab menu and toolbar with the same image (I need variations as ico file can provide).

  • Hello I have the cls custom ribbon made; but am not sure how to open customUI Book1

  • http://www.borsefendioutlet.it Borse Fendi Outlet

Page 2 of 5 (66 items) 12345