Consulting

Results 1 to 3 of 3

Thread: Is anything wrong with the idMso of the format painter?

  1. #1
    VBAX Contributor
    Joined
    Apr 2015
    Location
    Germany
    Posts
    167
    Location

    Is anything wrong with the idMso of the format painter?

    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/lib...ffice.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>
    Presentation1.pptx

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    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
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Contributor
    Joined
    Apr 2015
    Location
    Germany
    Posts
    167
    Location
    '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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •