Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi all,

    My colleague and I came across this post http://www.msfn.org/board/Modifying-Word-s...-UI-t89776.html via this website and have spent the last few days playing about with our own customUI.xml. We have come unstuck when trying to hide the Cover Page Gallery on the Insert Tab. We have the following:

    [codebox]<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <ribbon>
    <tabs>
    <tab id="BloggsTab" label="Bloggs Tab">
    <group id="BloggsGroup" label="Bloggs Group">
    <button id="BloggsButton" label="Bloggs Button" onAction="RibbonXOnAction" tag="landscape" />
    <gallery idMso="Undo" visible="false" />
    <gallery idMso="Redo" />
    </group>
    </tab>
    <tab idMso="TabInsert">
    <group idMso="GroupInsertPages">
    <gallery idMso="CoverPageInsertGallery" visible="false" />
    </group>
    </tab>
    </tabs>
    </ribbon>
    </customUI>[/codebox]

    This causes different results on our machines: I can open Word but find that the Cover Page Gallery is still visible on the Insert Tab; my colleague's machine generates an error stating "Controls in a built-in group cannot be modified: CoverPageInsertGallery"

    Comparing our own customUI.xml with the content of the one in the link above, we can see that that person has been able to hide Controls such as the GroupStyles on TabHome. Further, we have added Galleries to our own Custom Tab, and subsequently been able to hide those, so is it just the case that we specifically can't hide Galleries featured on in-built Mso Tabs?

    Further, we both have different ideas about what exactly the Gallery Conrol is so hopefully someone can clear that up for us (please forgive my personal choice of words for interpreting what I see on-screen): I think that the "button" and subsequent "floating dialog" combined make a Gallery Control; my colleague thinks that the "button" is indeed a Button Control and that the "floating dialog" is the Gallery Control. I hope I've explained that well enough, hopefully someone can resolve our debate (although I can completely understand her thinking too!).

    Thanks in advance,

    Violet

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    Violet,

    I get the same error message as your colleague, when I try your Ribbon XML code. I've only dabbled with Ribbon customization so far, but my working understanding has been to create my own custom tabs (that can contain custom as well as built-in controls), rather than trying to modify the built-in tabs.

    The button that initiates the display of the entire gallery, is itself part of the gallery control - there's no need to create a special, separate button.

    An excellent source for study and reference is Ribbon X - Customizing the Office 2007 Ribbon, by Robert Martin, Ken Puls, Teresa Hennig.

    Gary

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    I had read somewhere that you can't selectively hide a control within a built-in group. You need to hide the group and then re-create the group with the elements that you do want to see. So you need to move the visible=false up a line.
    <group idMso="GroupInsertPages" visible="false" >
    </group>

    The fact that it doesn't work and doesn't error on your machine is probably due to another error on your version as Word appears to be rejecting your xml.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='Gary Frieder' post='779349' date='11-Jun-2009 16:50']Violet,

    I get the same error message as your colleague, when I try your Ribbon XML code. I've only dabbled with Ribbon customization so far, but my working understanding has been to create my own custom tabs (that can contain custom as well as built-in controls), rather than trying to modify the built-in tabs.

    The button that initiates the display of the entire gallery, is itself part of the gallery control - there's no need to create a special, separate button.

    An excellent source for study and reference is Ribbon X - Customizing the Office 2007 Ribbon, by Robert Martin, Ken Puls, Teresa Hennig.

    Gary[/quote]

    Thanks Gary - we're having to order the book as nowhere nearby stocks it would you believe!

  5. #5
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='Andrew Lockton' post='779452' date='12-Jun-2009 01:05']I had read somewhere that you can't selectively hide a control within a built-in group. You need to hide the group and then re-create the group with the elements that you do want to see. So you need to move the visible=false up a line.
    <group idMso="GroupInsertPages" visible="false" >
    </group>

    The fact that it doesn't work and doesn't error on your machine is probably due to another error on your version as Word appears to be rejecting your xml.[/quote]

    Thanks Andrew, that's really helpful. I will look into what you're saying about the error message as the xml we have causes all the right stuff to appear on my machine with no error message.

    Cheers,

    V

Posting Permissions

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