PDA

View Full Version : [SOLVED] Is anything wrong with the idMso of the format painter?



RandomGerman
06-11-2015, 02:01 PM
Hi all,

usually I don't believe in ghosts in the machine. Usually it is about something I didn't know or a mistake I made. But this time ... well ...

I'd like to insert the format painter in my own ribbon. On https://msdn.microsoft.com/en-us/library/dd953379(v=office.12).aspx I read that it is a toggleButton and the idMso is "FormatPainter". That's the way I inserted it into my code. XML Validation says: All well! But it just doesn't appear. When I move it, e.g., between Cut and Copy, there isn't even space for it.

Is it possible, that the idMso is NOT "FormatPainter"? Does anyone have other ideas?


<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="MixedTab" label="Mixed">
<group id="MyOwnClipboard" label="Clipboard">
<buttonGroup id="CutCopyPaste">
<button idMso="Cut" enabled="true" showLabel="false"/>
<toggleButton idMso="FormatPainter" enabled="true"/>
<button idMso="Copy" enabled="true" showLabel="false"/>
<splitButton idMso="PasteMenu" enabled="true" showLabel="false"/>
</buttonGroup>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

13667

Paul_Hossler
06-11-2015, 03:47 PM
I think it was a 'toggleButton' in 2007, but in 2010 it's a 'control'




<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="RibbonControl.OnRibbonLoad" >
<ribbon>
<tabs>
<tab id="RGHomeTab" label="RG Home">
<group id="ToggleTest" label="Test">
<toggleButton id="customButton7" image="CuteBall-Games" size="large"
onAction="RibbonControl.ToggleonAction"
getPressed="RibbonControl.buttonPressed"
getLabel = "RibbonControl.buttonLabel"/>
</group>
</tab>
<tab id="MixedTab" label="Mixed">
<group id="MyOwnClipboard" label="Clipboard">
<buttonGroup id="CutCopyPaste">
<button idMso="Cut" enabled="true" showLabel="false"/>
<button idMso="Copy" enabled="true" showLabel="false"/>
<control idMso="FormatPainter" enabled="true"/>
<splitButton idMso="PasteMenu" enabled="true" showLabel="false"/>
</buttonGroup>
</group>
</tab>
</tabs>
</ribbon>
</customUI>




Attached is a 2010 cheat sheet of ID's

RandomGerman
06-12-2015, 05:14 AM
'Control' is correct for my machine, which works with 2010, thank you, Paul.

Maybe interesting: Although the Microsoft website (link above) said, it was 'toggleButton' in 2007, it seems to be 'control', too. For testing I inserted both ('toggleButton' left of 'cut', 'control' right of 'paste') and sent it to a friend, who works with 2007. On both computers, his and mine, only the right one ('control') appeared.