none
Word 2010 Ribbon using styles menu RRS feed

  • Question

  • Hi,

    I am new to Office 2010 and Ribbons but managed to migrate my 2003 menus to 2010 so far. Only thing which isn't working yet is that I want to use the 2010 styles menu which previews the styles and lets the user select one. I want to display this menu WITHOUT the button on its right with the options to change some stuff, the Icon shows "AA", hope you know what I mean. I tried:

    <group idMso="GroupStyles" label="Eingebettete Formatvorlagen"><menu idQ="ChangeStylesMenu" visible="false" /></group>

    The menu gets displayed well, the group label doesn't change and the button is still there though.

    How can I just display the menu with custom label and without the button?

    Thanks for any hint,

    Cheers!

    Monday, February 13, 2012 11:13 AM

All replies

  • Hi Dan

    Unfortunately, I can't see what you tried - all I see is a horizontal scrollbar, nothing else.

    If you mean you want to show the style gallery, but not the Change Styles button, you'll need to create your own Group and hide the built-in one. The XML would be something like this:

    <group idMso="GroupStyles" visible="false" />
    <group id="MyGroupStyles label="Styles >
      < control idMso="QuickStylesSets" >
    </group>


    Cindy Meister, VSTO/Word MVP

    Monday, February 13, 2012 5:52 PM
    Moderator
  • Thank you Cindy, actually this one almost works:

    <group idMso="QuickStylesGallery" visible="false" />
    <group id="MyGroupStyles" label="Styles" >
    <gallery idMso="QuickStylesGallery" size="large" columns="2" rows="5" />
    </group>

    Only problem is that now I have a menu, not the styles gallery with styles preview as displayed in the word "start" group.

    I can get it that way by using

    <group idMso="GroupStyles"></group>

    which is no good since it also adds the button which I don't want. Any suggestion?

    Wednesday, February 15, 2012 11:51 AM
  • Hi Danwe

    That's why I used a control element, rather than a gallery element? Try just substituting control for gallery and see if that doesn't help.


    Cindy Meister, VSTO/Word MVP

    Wednesday, February 15, 2012 5:05 PM
    Moderator
  • I have tried that already, doesn't change anything though. I guess there is some parameter missing?

    I don't quite understand the concept here, what exactly is "QuickStylesGallery" ? Is it an ui element based on gallery or is it just a gallery? And does my code above create a new instance or just reference an existing one with the ID "QuickStylesGallery" or is "QuickStylesGallery" the name of the class?

    Friday, February 17, 2012 10:22 AM