RibbonX Updates for B2TR

Today's Guest Writer: Savraj Dhanjal

Savraj is a Program Manager on the Office User Experience team focused on user interface extensibility for Office developers.

As you may have discovered, we made a few tweaks to the UI developer story in Beta 2 Technical Refresh.

The biggest change is the updated Control ID list we published yesterday. We've updated the name of nearly every command in Office to be more logical, searchable, and easy to understand. If you are interested in finding out the ID numbers of commands for use with Group Policy, you can find them in these lists as well, in the Policy ID column.

We do not expect to change these IDs again for RTM, so (cross our fingers) this is the final list for Office 2007. We hope you find the new Excel-based lists easier to use and more flexible than the text files released with Beta 2.

Download Office 2007 B2TR Control ID List

If you have Beta 2 UI customizations which use a large number of built-in control IDs, manually updating each ID will take a while. So we wrote a command-line tool, UpdateIdMso, that takes a customUI xml file containing Beta 2 ID's and outputs a file with updated B2TR IDs. We hope this tool will make the upgrade process a bit easier for you.

Download UpdateIdMso Tool

We also have a new customUI schema for B2TR. The schema has only a couple of notable changes. We renamed the fileMenu tag to officeMenu and also changed advanced to dialogBoxLauncher. We made these changes to ensure that the developer model matches the final feature names in the product.

Download B2TR customUI Schema

Along with the control ID list, another reference we've created is the Office 2007 Icons Gallery. Open this file and you'll get a new group on the Developer tab in Excel, filled with galleries of the icons you can reuse in your Office 2007 solutions. Just click an icon, and you'll learn its control ID. Use this ID with the imageMso attribute to copy our icons to your controls.

Download Office 2007 Icons Gallery

Perhaps the most interesting functionality we added in B2TR is the ability to execute built-in controls by control ID, and the ability to query control properties by control ID.

For example, if you want to find out if the Save button is enabled, just call:


and we'll return a boolean with the answer. And if you want to programmatically execute an obscure command that has no object model equivalent, just fire off:


The other functions are GetImageMso, GetLabelMso, GetPressedMso, GetScreentipMso, GetSupertipMso, and GetVisibleMso.

The VBA object browser lists the function parameters and return values, which will also be detailed on our MSDN site when it is updated in the coming weeks.

Thanks and let us know if you have questions. Happy solution-building!

Comments (45)
  1. Andre says:

    I seriously hope that the "Customizing the Office (2007) Ribbon User Interface for Developers" articels are beeing reviewed and touched up before RTM, currently those articels have the lowest quality I have seen in the MSDN in the last 5 years.

    First, C is not C#, the author always talks about C and gives C# examples, that’s just ***horrible***.

    Then there are so many mistakes in the attribute names (getScreen, what does that attribute do?) and function signatures where the author just did copy&paste from a different function…

  2. Patrick Schmid says:


    I like all those changes, especially the introduction of the beginnings of an OM.

    Is B2TR feature-complete for RibbonX and related issues?

  3. JoeInfinity says:


    Having installed RC1, I get the following errors when adding in my .dotm template with custom ribbon info (which used to work fine):



    Microsoft Office Word


    The Office Open XML file ShabashRibbon.dotm cannot be opened because there are problems with the context.

                   OK      Details>>>


    Unspecified error

    Location: Part: /word/vbaData.xml, Line: 2, Column: 589




    Microsoft Office Word


    Word found unreadable content in ShabashRibbon.dotm. Do you want to recover the contents of this document? If you trust the source of this document, click yes.

                  Yes   No

    Was this information helpful?


    The answer to that last question, is "No".

    The custom UI editor still tells me my XML is well formed, having copied in the new schema.

    Can you help please?

  4. Patrick Schmid says:


    you should make sure that the file is in the B2TR file format. Open it via Office button, Open in B2TR and use Save As to save it with a new file name. If that doesn’t do it, send me your file via email. You can get my address from my website.

  5. JoeInfinitiy says:


    Your suggestion didn’t work, as it wouldn’t let me open the template from within Word. However I did use what you said. I created a new template (therefore having the B2TR file format), and using the CustomUI editor copyied text from my template and then pasted it into the newly created template. Which worked perfectly.

    Thanks very much for your help.

  6. frice says:

    To Andre (and others)

    Thanks for the feedback! Since those documents were published, the Ribbon schema has undergone several changes. The papers are undergoing substantial updates and will be republished in the next couple of weeks. You might check my series of 6 blogs that provide more up-to-date samples (although I will be checking them for changed information when the revised articles are released. Stay tuned.

  7. Savraj released some new details on RibbonX. Find information about the ID's of built in controls,

  8. Sweet says:

    Thanks for the update! VBA is, in my opinion, the best feature in Microsoft Office.

  9. Marcus says:

    Thanks for the update.

  10. Darrin says:

    I think the new updates an functionality of the B2TR, including the RibbonX updates are great! Once I figured out the differences between the last version and this new one, I’m able to make excellent use of all the new Offfice Updates/RibbonX!!

    Thank you!!

  11. XL-Dennis says:


    Great with the new functions as they give us more control and more flexibility 🙂

    If You can put together all the documentation and also improve the quality of the available examples then we will have the major guideline ‘at our fingertop’.

    Can You confirm that it will be possible to hook on a customized help when using the supertip "Press F1 for more help"? Is it possible to hide/remove it when no associated help is available?

    If yes, can You upload an example for us?

    TIA and all with kind regards,


  12. Stephen Bullen says:

    Savraj, thanks for listening to our many requests and doing something about them. Does the Excel addin for icon gallery exist for the other apps, or just Excel – and does it show the full set of Office icons, or just those available in Excel.


  13. David says:

    Thanks Savraj,

    Have any decisions been made as far as what icons developers can utilise in their own applications, I assume the ribbon is OK as Microsoft have exposed this to us, but what about actually extracting icons and using them in winforms regardless if its an Excel add-in or not.

    Our primary product is an Excel add-in and we’re in the middle of redesign work…



  14. ThomasL says:

    I noticed in outlook the ‘send’ button isnt within the ribbon. It is a generic, grey button. I liked it better when it was in the ribbon.

  15. Patrick Schmid says:


    I haven’t checked this yet, but the function GetImageMso sounds like it would return the actual icon.

  16. technochrista says:

    The link: http://www.sunflowerhead.com/msimages/Office2007IconsGallery.zip for downloading the Office 2007 icons is not working. Please post an updated link as I would like to download these files.

  17. jensenh says:


    The link works fine for me…

  18. Patrick says:

    You moved the Send button!!! Arrrrr!!!!!!!!! Gru Mad!

  19. Savraj says:

    Hey everyone,

    Glad you liked the updates. Some responses:

    1) Unfortunately you cannot hook the "press F1 for help" supertip this release.

    2) The icon gallery as an Excel workbook contains *all* of the icons. It is not just limited to Excel.

  20. Any chance of you guys putting out the individual icons in PNG.GIF/ICO format so that we can use them in our own apps? Thanks!

  21. XL-Dennis says:


    Thanks for clearing it out. Does it mean that it will be possible in the final release of 2007?

    Kind regards,


  22. Savraj says:

    Hi Dennis! It will not be possible to override "Press F1 for Help" in Office 2007.

  23. John West says:

    I second Dennis’ request for being able to hook or hide the "Press F1 For Help" message in a custom ribbon.

  24. Arno Schoedl says:


    one thing puzzles me conceptually about RibbonX: I assume CommandBars::GetPressedMso (as Office UI state in general) is per-container and may give different answers for different CommandBars objects. For example, Excel has a Application::CommandBars for the main window, and Workbook::CommandBars for OLE-embedded workbooks.

    But which container am I supposed to give an answer for when my IRibbonExtensibility::get_Pressed callback is called?

    Thanks for help,


  25. Arno Schoedl says:

    Another vote for hiding the "Press F1 For Help" message in a custom ribbon.

  26. Mike says:

    I have asked about this before, but where is the accessibility in the Office 2007 UI?  Personally, I like it, though I think the hubris regarding the lack of UI customization for power users is very short sighted; but what of users who have vision problems (whether not being able to see the nearly microscopic QAT or unable to view the toolbars because of color-blindness)?  Want to replace labels with icons (or visa versa)? Sorry, can’t do that.  Want to make all your icons larger?  Sorry, we’ve fixed the ribbon so that’s impossible.  

    I ask the question again – why is the 2007 UI ignoring users with vision problems?  Perhaps Microsoft will consider this before RTM and an ADA lawsuit.

  27. Karlen says:

    What adaptive technology are you using?

    I’ve been successfully using Office 2007 and OneNote 2007 since last November when I joined the beta team. I have a visual disability and use screen reading and screen magnification software. I’ve also applied the high contrast black to the Ribbon which makes it usable for those who want a higher contrast for the tools.

    In terms of keyboard access, I find the Ribbon no more demanding than moving through the menu items of Office 2003 and in most instances my keyboarding isn’t as extensive as with traditional menus – tools are easily findable/visible.

    Perhaps you can let me know what specific problems you are encountering?

    Note, that as with all adaptive technology, developers will have a compatible version once the Office beta cycle is over and the product is released. Until that time, we can’t expect full support for a beta product.

    Cheers, Karen

  28. Noopur says:

    I have written a com add in but cannot bind a function written there using KeyBindings. plz help.

  29. Stefan KZVB says:

    Savraj Dhanjal’s VBA-Sample seems not to work anymore with B2TR. Anybody else experienced this? Also tried UpdateIDMso on the customui.xml, but it crashes like below 🙁

    Unhandled Exception: System.Security.SecurityException: Request for the permissi

    on of type ‘System.Security.Permissions.SecurityPermission, mscorlib, Version=2.

    0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed.

      at System.Runtime.Serialization.Formatters.Binary.ObjectReader.CheckSecurity(

    ParseRecord pr)

      at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(Pa

    rseRecord pr)


  30. Stefan KZVB says:

    Is it really impossible to remove/make invisible a single button from an existing tab? I get an error message.

    That’s the way I tried it:

            <tab idMso="TabMailings">

               <group idMso="GroupMailMergeWriteInsertFields">

    <button idMso="MailMergeAddressBlockInsert"





    Removing a complete group works. But only making a button invisible gives an error message.

    By the way: Does anybody here know the location where it is saved, which mailmerge fields from the data source correspond to the address block fields?

  31. Stefan KZVB says:

    This one doesn’t give an error but doesn’t work either:


    <button idMso="FileInternetFax" visible="false"/>


    …while this one works as expected:


    <menu idMso="FileSendMenu" visible="false"/>


  32. If you have been developing custom Ribbon UI solutions like Mindjet or ClearContext , you’ve noticed

  33. I have loaded the CustomUI.xsd.

    I tried to find the keyword "advanced", and it

    is impossible to find it !

    Impossible to create an advanced element

    in a group in Outlook 2007.

    Is it normal ?


  34. OK,

    it seems that "advanced" is replaced by "dialogBoxLauncher".

    Could you modify your examples or add a

    note on your examples ?


Comments are closed.

Skip to main content