none
Access 2010 Custom Ribbons using USysRibbons Table RRS feed

  • Question

  • I'm looking to combine the following, these both work separately and do what I want them to do but I want to use them both, can anyone off any suggestions to either use both with either the same tab or separate tabs?

    No1

    <mso:customUI xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">

      <mso:ribbon startFromScratch="true">

      <mso:tabs>

     <mso:tab id="MyExport" label="Print Export Data">

      <mso:group id="Export"  label="Options" >

        <mso:button idQ="mso:ExportExcel" visible="true" />

        <mso:button idQ="mso:PublishToPdfOrEdoc" visible="true" />

    </mso:group>

     </mso:tab>

      </mso:tabs>

      </mso:ribbon>

     </mso:customUI>

    No2

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">

       <ribbon startFromScratch="true">

         <tabs>

          <tab id="MyReport" label="Report Print and View Options">

            <group idMso="GroupPrintPreviewPrintAccess" />

             <group idMso="GroupPageLayoutAccess" />

             <group idMso="GroupZoom" />

            <group id="ListCommands" label="Print">

                < button idMso="FilePrintQuick" size="large"/>

                < button idMso="PrintDialogAccess" label="Choose printer" size="large"/>

    </group>

     </tab>

      </tabs>

      </ribbon>

     </customUI>




    Friday, May 20, 2016 11:42 AM

Answers

All replies

  • Does the first custom UI tab work without the "mso:" prefixes?

    Try copying everything between the <tab>... </tab> from the second block to immediately before the </tabs> in the first block.

    The resulting structure should look similar to this (I've only included the tags, to clearly show the overall structure):

    <customUI .....>
          <ribbon...>
                  <tabs ... >
                        <tab ...>
                               <group>
                                     <button ...   /> 
                                </group>
                          </tab>
                          <tab...>
                                 <group...>
                                       <button ... />
                                  </group>
                           </tab>
                        </tabs>
           </ribbon>
    </customUI>


    Miriam Bizup Access MVP


    • Edited by mbizup MVP Friday, May 20, 2016 12:04 PM
    Friday, May 20, 2016 12:01 PM
  • Thanks but not sure I follow, do I keep the same structure and slide them around or do I use the above structure and reformat?  In the groups I have tab & mso tab, group & group mso do they work together?

    Friday, May 20, 2016 1:43 PM
  • I've numbered them to make it easier, can you note which elements to copy and place?

    1 <mso:customUI xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">

    2 <mso:ribbon startFromScratch="true">

    3 <mso:tabs>

    4 <mso:tab id="MyExport" label="Print Export Data">

    5 <mso:group id="Export"  label="Options" >

    6 <mso:button idQ="mso:ExportExcel" visible="true" />

    7 <mso:button idQ="mso:PublishToPdfOrEdoc" visible="true" />

    8 </mso:group>

    9 </mso:tab>

    10 </mso:tabs>

    11 </mso:ribbon>

    12 </mso:customUI>

    --

    1 <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">

    2 <ribbon startFromScratch="true">

    3 <tabs>

    4 <tab id="MyReport" label="Report Print and View Options">

    5 <group idMso="GroupPrintPreviewPrintAccess" />

    6 <group idMso="GroupPageLayoutAccess" />

    7 <group idMso="GroupZoom" />

    8 <group id="ListCommands" label="Print">

    9 <button idMso="FilePrintQuick" size="large"/>

    10 <button idMso="PrintDialogAccess" label="Choose printer" size="large"/>

    11 </group>

    12 </tab>

    13 </tabs>

    14 </ribbon>

    15 </customUI>



    Friday, May 20, 2016 2:05 PM
  • Basically, take lines 4-12 in block two and place them immediately after line 9 in the first block.  This will give you two separate tabs.

    the idea is to nest the tabs like this:

    <tabs>

              <tab id="firstTab">

                     ... contents of first tab

               </tab>

               <tab id="secondTab">

                      ... contents of second tab

                </tab>

    </tabs>

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
      <ribbon startFromScratch="true">
      <tabs>
     <tab id="MyExport" label="Print Export Data">
      <group id="Export"  label="Options" >
        <button idMso="ExportExcel" visible="true" />
        <button idMso="PublishToPdfOrEdoc" visible="true" /> 
    </group>
     </tab>
       <tab id="tabReport" label="Report Print And View Options">
            <group idMso="GroupPrintPreviewPrintAccess" />
             <group idMso="GroupPageLayoutAccess" />
             <group idMso="GroupZoom" />
                        <group id="grpListCommands" label="Print">
     <button idMso="FilePrintQuick" size="large" visible="true"/>
                 <button idMso="PrintDialogAccess" visible="true" label="Choose printer" size="large"/>
                        </group>
                 </tab>
      </tabs>
      </ribbon>
     </customUI>

    Note that I also took out the mso: prefixes in the first block for consistency.


    Miriam Bizup Access MVP

    • Proposed as answer by mbizup MVP Monday, May 23, 2016 9:00 AM
    Friday, May 20, 2016 6:10 PM
  • Also, if you want everything on a single tab (this is a cleaner layout, IMO), you would remove the 'end tag' of the first tab and the 'start tag' of the second tab in the XML I posted in my last comment, so the structure would look like this:
    <tabs>
              <tab id="mainTab">
    
                     ... combined contents of both tabs
    
    
                </tab>
    
    </tabs>
    
    Give that a try if you're interested and post back if you need help.

    Miriam Bizup Access MVP

    Friday, May 20, 2016 8:28 PM
  • Thanks, I now have what I want but want to combine both the functions below, I've tried several ways but don't seem to be able to get the right combination, can you advise the best way?

    --------------

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">

    <ribbon startFromScratch="true">

    <tabs>

    <tab id="MyReport" label=" Print and Export ">

    <group id="ListCommands" label="Options">

    <button idMso="PrintDialogAccess" label="Select Printer" size="large"/>

    <button idMso="PublishToPdfOrEdoc" keytip="p" size="large" supertip="Save this document as .pdf or .xps"/>

    <button idMso="ExportExcel" label="Export to Excel" visible="true" size="large" />

    </group>

    </tab>

    </tabs>

    </ribbon>

    </customUI>

    ----------------

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">

    <ribbon startFromScratch="true">

    </ribbon>

    <backstage>

    <tab idMso ="TabPrint" visible="false"/>

    <button idMso="ApplicationOptionsDialog" visible="false"/>

    <button idMso="FileExit" visible="true"/>

    </backstage>

    </customUI>


    Saturday, May 21, 2016 1:05 PM
  • I have never seen anyone try to use two different office schemas in one Access custom ribbon table as it appears you are trying to do:

    <mso:customUI xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">

    Does Access even allow that?

    Saturday, May 21, 2016 3:28 PM
  • My apologies I copied the wrong schema details, I've managed to fix my issue as per below:

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" >

    <ribbon startFromScratch="true">

    <tabs>

    <tab id="dbCustomTab" label =" Print Save &amp;&amp; Export">

    <group id="ListCommands" label="Print">

    <button idMso="FilePrintQuick" label="Quick Print" size="large" supertip="Print to default printer"/>

    <button idMso="PrintDialogAccess" label="Print Dialog" size="large" supertip="Open print dialog"/>

    </group>

    <group id="MyGroup" label="Options">

    <button idMso="PublishToPdfOrEdoc" keytip="p" size="large" supertip="Save document as .pdf or .xps"/>

    <button idMso="ExportExcel" label="Export to Excel" visible="true" size="large" supertip="Export data to Excel as .xlsx"/>

    <button idMso="ExportWord" label="Export to Word" visible="true" size="large" supertip="Export document to Word as .docx"/>

    </group>

    <group id="Exit" keytip="x" label="Exit">

    <button idMso="PrintPreviewClose" size="large"/>
    </group>

    </tab>

    </tabs>

    </ribbon>

    <backstage>

    <tab idMso ="TabPrint" visible="false"/>

    <button idMso="ApplicationOptionsDialog" visible="false"/>

    </backstage>

    </customUI>

    Saturday, May 21, 2016 4:28 PM
  • Glad you've got it working. Good luck with your project!

    Miriam Bizup Access MVP

    • Marked as answer by DanielsMark Monday, May 23, 2016 9:38 AM
    Monday, May 23, 2016 12:36 AM
  • Hi DanielsMark,

    Have your issue been resolved? If you have, I suggest you mark the solution as answer to close this thread, and then others who run into the same issue would find the solution easily. If not, please feel free to let us know your current situation.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, May 23, 2016 5:35 AM