Consulting

Results 1 to 3 of 3

Thread: Word 2010 Ribbon question

  1. #1
    VBAX Master
    Joined
    Feb 2011
    Posts
    1,480
    Location

    Word 2010 Ribbon question

    I know there is a ribbon forum, but a) it's pretty dead and b) it applies to Word 2007 (technically), which is somewhat different.

    I have a very specific question: does anyone know the xml code to actually recreate the Font Group from scratch? I've gotten as far as this:

      <ribbon>
        <tabs>
          <tab idMso="TabHome">
            <group idMso="GroupFont" visible="true"></group>
            <group id="grpFontCustom" label="Font (new)" imageMso="WordArtFormatDialog" insertBeforeMso="GroupFont" autoScale="false" centerVertically="true" >
              <box id="bxFont1" boxStyle="horizontal">
                <control idMso="Font" visible="true"/>
                <control idMso="FontSize" visible="true"/>
                <control idMso="FontSizeIncreaseWord" visible="true"/>
                <control idMso="FontSizeDecreaseWord" visible="true"/>
                <gallery idMso="ChangeCaseGallery" visible="true" />
                <control idMso="ClearFormatting" visible="true"/>
              </box>
              <box id="bxFont2" boxStyle="horizontal">
                <control idMso="Bold" visible="true"/>
                <control idMso="Italic" visible="true"/>
                <gallery idMso="UnderlineGallery" visible="true"/>
                <control idMso="Strikethrough" visible="true"/>
                <control idMso="Subscript" visible="true"/>
                <control idMso="Superscript" visible="true"/>
                <gallery idMso="TextEffectsGallery" visible="true"/>
                <gallery idMso="TextHighlightColorPicker"  visible="true"/>
                <gallery idMso="FontColorPicker" visible="true"/>
              </box>
              <dialogBoxLauncher>
                <button idMso="FontDialog" visible="true"/>
              </dialogBoxLauncher>
            </group>
         </tab>
       </tabs>
     </ribbon>
    What I'm missing is the actual separators between a couple of the buttons.

    Note: I have cross-posted this in our ribbon forum
    http://www.vbaexpress.com/forum/showthread.php?t=38520

  2. #2
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,334
    Location
    Jason,

    I don't think is it possible. While I have often seen in MS documentation "Hide the built-in group and create a new custom built-in group ...." they never provide all the tools and capabilities to do so. Yes you can duplicate the functionality but not the look.

    There is a "separator" control but it is not a child of a box control. It divides and "entire" group (top to bottom) into visible segments. The best I've been able to do is use a labelControl with the pipe characters "|" set as the label. It is a little squat but like I say it is the best I can do.

    You may also notice the difference in alignment of your two rows of commands. The top row in the built in group is closer to the top of the group and there is more separation between the rows. There is no way to precisely duplicate the "look" of a built-in group.
    Greg

    Visit my website: http://gregmaxey.com

  3. #3
    VBAX Master
    Joined
    Feb 2011
    Posts
    1,480
    Location
    That's funny... the pipe character is what I had the thought of doing too. And then when I tested it I thought "it looks so short!"

    Alright... going to keep my fingers crossed someone else has an idea/work-around. How maddening.

Posting Permissions

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