locked
Add button to existing group in existing tab RRS feed

  • Question

  • Hi,

    Is it possible to a customize the ribbon to exisiting group?

    In Data tab I added a button as new group I would like to add this button to existing group "Get External Data".

    This is the XML code:

    <

    tab idMso="TabData">

    <

    group id="GetExternalData"label="Query">

      <

    button id="ImportData"label="Import data"imageMso="DatabaseQueryNew"size="large"onAction="ImportData"/>  

    </

    group>

    </

    tab>

    <

    tab idMso="TabData">


    <

    group id="GetExternalData"label="Query">


      <

    button id="ImportData"label="Import data"imageMso="DatabaseQueryNew"size="large"onAction="ImportData"/>  


    </

    group>


    </

    tab>


    Guy Zommer

    Tuesday, May 21, 2013 5:56 AM

Answers

  • No you can not add to built in groups.

    Instead you can rebuild your own group using the idMso references and hide the default one.

    <customUI  xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
        <ribbon >
            <tabs >
                <tab  idMso="TabData" >
                    <group
                        id="Group1"
                        insertBeforeMso="GroupGetExternalData"
                        label="Get External Data">
                        <button
                            idMso="GetExternalDataFromAccess"
                            label="From Access"
                            size="large"/>
                        <button
                            idMso="GetExternalDataFromWeb"
                            label="From Web"
                            size="large"/>
                        <button
                            idMso="GetExternalDataFromText"
                            label="From Text"
                            size="large"/>
                        <gallery
                            idMso="GetExternalDataFromOtherSources"
                            label="From Other Sources"
                            size="large"/>
                        <separator  id="Separator1" />
                        <button
                            idMso="GetExternalDataExistingConnections"
                            label="Existing Connections"
                            size="large"/>
                        <separator  id="Separator2" />
                        <button
                            id="ImportData"
                            imageMso="DatabaseQueryNew"
                            label="Import Data"
                            size="large"
                            onAction="ImportData"/>
                    </group >
                    <group
                        idMso="GroupGetExternalData"
                        visible="false"/>
                </tab >
            </tabs >
        </ribbon >
    </customUI >



    Cheers,

    Andy
    www.andypope.info

    • Marked as answer by Guy Zommer Tuesday, May 21, 2013 4:06 PM
    Tuesday, May 21, 2013 3:58 PM

All replies

  • No you can not add to built in groups.

    Instead you can rebuild your own group using the idMso references and hide the default one.

    <customUI  xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
        <ribbon >
            <tabs >
                <tab  idMso="TabData" >
                    <group
                        id="Group1"
                        insertBeforeMso="GroupGetExternalData"
                        label="Get External Data">
                        <button
                            idMso="GetExternalDataFromAccess"
                            label="From Access"
                            size="large"/>
                        <button
                            idMso="GetExternalDataFromWeb"
                            label="From Web"
                            size="large"/>
                        <button
                            idMso="GetExternalDataFromText"
                            label="From Text"
                            size="large"/>
                        <gallery
                            idMso="GetExternalDataFromOtherSources"
                            label="From Other Sources"
                            size="large"/>
                        <separator  id="Separator1" />
                        <button
                            idMso="GetExternalDataExistingConnections"
                            label="Existing Connections"
                            size="large"/>
                        <separator  id="Separator2" />
                        <button
                            id="ImportData"
                            imageMso="DatabaseQueryNew"
                            label="Import Data"
                            size="large"
                            onAction="ImportData"/>
                    </group >
                    <group
                        idMso="GroupGetExternalData"
                        visible="false"/>
                </tab >
            </tabs >
        </ribbon >
    </customUI >



    Cheers,

    Andy
    www.andypope.info

    • Marked as answer by Guy Zommer Tuesday, May 21, 2013 4:06 PM
    Tuesday, May 21, 2013 3:58 PM
  • Thanks

    Guy Zommer

    Thursday, May 23, 2013 7:37 AM