FormatPainter Word 2007 Ribbon Control

I ran across an interesting situation today in the Word 2007 Ribbon. In a project that I’m working on, the FormatPainter Ribbon control wasn’t showing up in a custom tab. Here is the Ribbon XML element that was being used:

<toggleButton idMso=”FormatPainter” imageMso=”FormatPainter” />

I double checked the idMso and control type in the Microsoft 2007 Office System Document: Lists of Control IDs Word Ribbon Controls Excel spreadsheet. I had entered the idMso correctly and I had the correct control type, according to the spreadsheet.

Next I wanted to see if the problem was isolated to my project and not with Word itself. I opened a new Word 2007 Add-In project and added the same code to a custom tab. Again, no Format Painter control. But, this time I was able to see the error message that indicated that the control type was incorrect. It turns out that the FormatPainter control is referenced as “control” not “togglebutton“.

Here is the updated Ribbon XML element:

<control idMso=”FormatPainter” imageMso=”FormatPainter”/>

Now the FormatPainter control shows up as expected in my custom tab.

3 thoughts on “FormatPainter Word 2007 Ribbon Control

  1. I’m trying to get rid of the Format Painter in Word, and am not having much luck. I’ve used the following:<control idMso=”FormatPainter” visible=”false” />Instead of visible=”false”, I’ve tried label=” “, label=”Painter”… nothing seems to work. Instead of control, I’ve tried button, toggleButton without success. I’d like to remove it completely, but a shorter label would be almost as good.As a test, I’ve added size=”large” or imageMso=”StylesPane”. No luck.Is this simply a stubborn control, or is there something else I must do?Thanks.

  2. Without rebuilding the Word Ribbon (by setting the startFromScratch attribute to true and then adding all of the regular Word tabs/controls), you can’t hide this control. However, you can disable this control, in your Ribbon Xml file.;

Leave a Reply

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