none
Creating a custom Ribbon in MSAccess2016 using XML RRS feed

  • Question

  • I Hope I Can find a solution

    I Want to create a custom Ribbon, I'm using msaccess2016 32bit

    I wrote the following XML Code in a field in a table  :

    	
    <customUI xmlns="http://schemas.microsoft.com
    /office/2006/01/customui">
      <ribbon startFromScratch="false">
        <tabs>
          <tab idMso="TabCreate" visible="false" />
          <tab id="dbCustomTab" label="A Custom Tab" visible="true">
            <group id="dbCustomGroup" label="A Custom Group">
              <control idMso="Paste" label="Built-in Paste" enabled="true"/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    </customUI>

    2 errors appear :

    First

    line 3

    column 26

    Error Code : 0x800004005

    Unknown name space: 

    "http://schemas.microsoft.com
    /office/2006/01/customui"

    Element: Customui

    Second

    line 14

    column 11

    Error Code : 0x800004005

    The node is neither valid nor invalid because no DTD/Schema declaration was found.


    • Edited by Lara Adam Saturday, October 26, 2019 11:37 AM
    Saturday, October 26, 2019 11:26 AM

Answers

  • Check this as a sample

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
     <ribbon startFromScratch="true">
       <tabs>
      <tab id = "tbMain" label = "Main">
        <group id="grpEssentials" label="SomeLabel">     
         <button id="yourButtonID" label="label of the Button" imageMso="DatasheetColumnLookup" size="large" onAction="A method that executes on click"/>
         </group>
        <group id="Exit" label="Exit">
           <button id="cmdExit"  label="Exit From the Application" imageMso="PrintPreviewClose" onAction="AppExit" size="large"/>
         </group>
    </tab>
    </tabs>
     </ribbon>
    </customUI>


    • Edited by John Tsioumpris Saturday, October 26, 2019 12:14 PM
    • Marked as answer by Lara Adam Sunday, October 27, 2019 5:53 AM
    Saturday, October 26, 2019 12:14 PM

All replies

  • Hi

    I have spent hours to create custom Ribbons. Without succes.
    But there is a great tool for this:

    http://www.ribboncreator2019.de/en/


    Cheers // Peter Forss Stockholm

    Saturday, October 26, 2019 12:08 PM
  • Check this as a sample

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
     <ribbon startFromScratch="true">
       <tabs>
      <tab id = "tbMain" label = "Main">
        <group id="grpEssentials" label="SomeLabel">     
         <button id="yourButtonID" label="label of the Button" imageMso="DatasheetColumnLookup" size="large" onAction="A method that executes on click"/>
         </group>
        <group id="Exit" label="Exit">
           <button id="cmdExit"  label="Exit From the Application" imageMso="PrintPreviewClose" onAction="AppExit" size="large"/>
         </group>
    </tab>
    </tabs>
     </ribbon>
    </customUI>


    • Edited by John Tsioumpris Saturday, October 26, 2019 12:14 PM
    • Marked as answer by Lara Adam Sunday, October 27, 2019 5:53 AM
    Saturday, October 26, 2019 12:14 PM
  • Thanks for your help
    Saturday, October 26, 2019 12:45 PM
  • Thanks for your help,I'll try it..
    Saturday, October 26, 2019 11:04 PM
  • I tried your code, it works without errors,thank you

    but the ribbon appears with the Tab(File) As a default in any created ribbon, is there any way to hide it ?

    Saturday, October 26, 2019 11:08 PM
  • Hi Fross Peter,

    Using This tool can you create a ribbon without the (file) Tab in it ? it is a default tab for any created Ribbon, I want my Ribbon without this tab.., Tkanks


    • Edited by Lara Adam Sunday, October 27, 2019 10:33 AM
    Sunday, October 27, 2019 6:31 AM
  • Microsoft do not currently allow the File tab to be removed when you create a custom ribbon.

    However you can hide/disable the items that show on the file tab.  The file tab and some of the options above the ribbon are referred to as "backstage" so if you search for that you should find plenty of relevant xml.

    I'm not affiliated with http://www.ribboncreator2019.de/en/ but it is a handy tool that saved me a lot of headaches with manually coding xml for custom ribbons.  It also provides options to hide/disable most backstage items.  There are a couple of other backstage items you may need to google for if you also want to hide/disable them.


    Tuesday, October 29, 2019 1:07 PM