Results 1 to 6 of 6
  1. #1
    JoeJr is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    62

    XML ribbon setup

    Hello all,



    I am currently working on the XML file to load in my USysRibbons table of my final database. I am working with in a test db to make sure it is working properly. Currently I have all the <backstage> items applied. What I cant figure out is how to hide the "home, create, external data, database tools" tabs at the top. I have tried adding <Tab> and </Tab> between the two ribbon brackets but it doesnt work. Any help would be great. I already know that I can go into options and turn these items off but I dont want to do that. I want to use my XML files to be call when a user logs in.

    Here is my current XML:

    Code:
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
      <ribbon startFromScratch="false">
           <!-- Ribbon XML -->
    </ribbon>
      <backstage>
       <button idMso="FileSave" visible="false"/>
       <button idMso="SaveObjectAs" visible="false"/>
       <button idMso="FileOpen" visible="false"/>
       <button idMso="FileCloseDatabase" visible="false"/>
       <button idMso="FileExit" visible="false"/>
       <tab idMso="TabCreate" visible="false"/>
       <tab idMso="TabSave" visible="false"/>
       <tab idMso="TabOfficeStart" visible="false"/>
       <tab idMso="TabInfo" visible="false"/>
       <tab idMso="TabRecent" visible="false"/>
       <tab idMso="TabNew" visible="false"/>
       <tab idMso="TabPrint" visible="false"/>
       <tab idMso="TabShare" visible="false"/>
       <tab idMso="TabHelp" visible="false"/>
       <tab idMso="TabHome" visible="false"/>
       <tab idMso="TabFile" visible="false"/>
      </backstage>
    </customUI>

  2. #2
    JoeJr is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    62
    The Issue that I am running into is that when I add the tab section, it seems that it doesnt like to be in the same XML with backstage settings.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I'm no ribbon xml expert but I believe the backstage stuff is a separate block. I have used this, which seems to work for the most part:
    Code:
    <backstage>
       <tab idMso="TabInfo" visible="false"/> 
       <tab idMso="TabRecent" visible="false"/> 
       <tab idMso="TabNew" visible="false"/> 
       <tab idMso="TabPrint" visible="false"/>
       <tab idMso="TabHelp" visible="false"/> 
       <tab idMso="TabPublish" visible="false"/> 
       <tab idMso="TabSave" visible="false"/>
       <button idMso="FileSave" visible="false"/>
       <tab idMso="TabFileSave" visible="false"/>
       <group idMso="SaveGroup" visible="false"/>
       <tab idMso="TabOfficeStart" visible="false"/> 
       <tab idMso="Publish2Tab" visible="false"/> 
       <tab idMso="TabOfficeFeedback" visible="false"/>
       <button idMso="ApplicationOptionsDialog" visible="false"/>
    </backstage>
    During testing (at least), you want to have Client Settings > General > show add in user interface errors checked. So I guess I'm saying if we can't see any errors between these 2 then make sure you enable the error checking for this and maybe something will get pinpointed. In my testing, I also seemed to experience that the order of items matters for some reason. It may also be that I'm disabling some items within Group tags, not Tab tags.
    Last edited by Micron; 10-27-2019 at 10:04 AM. Reason: clarification & code correction
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I had my backstage part commented out because it is a work in progress and I found it bothersome to not have certain default ribbon functions unavailable while developing. However it has been a while since I played with this and was sure it was working but "parked". Turns out it is not as it doesn't seem to like the Group tag when I enabled it. I'll have to keep playing, but I guess I'm not being a whole lot of help on this. I know there's plenty of info if you Google this topic, but I found a lot of what was offered didn't work and is certainly xml version specific. And as noted, it the order of backstage disabling seemed to matter.

    UPDATE - I took code from one db where there is nothing in the backstage and transferred it to another one and it works in one and not the other??? There are no errors and I have enabled the error checking in both. I'm reminded now of why I parked this for the time being. A lot of that code is commented out yet it works differently in 2 places:
    Code:
    <backstage>
      <!--<tab idMso="TabInfo" visible="false"/> -->
      <!-- <tab idMso="TabRecent" visible="false"/> -->
      <!--<tab idMso="TabNew" visible="false"/> -->
      <tab idMso="TabPrint" visible="false"/>
      <!--<tab idMso="TabHelp" visible="false"/> -->
      <!--<tab idMso="TabPublish" visible="false"/> -->
      <!--<tab idMso="TabSave" visible="false"/> -->
      <!-- <tab idMso="TabOfficeStart" visible="false"/> -->
        <!--<tab idMso="Publish2Tab" visible="false"/> -->
        <tab idMso="TabOfficeFeedback" visible="false"/>
      <button idMso="ApplicationOptionsDialog" visible="false"/>
    </backstage>

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Answering on my phone so can't post code.
    Have a look at this article on my website http://www.mendipdatasystems.co.uk/i...y-2/4594571073
    It includes the XML you need to remove various ribbon menus including Home.
    You can also remove all ribbon menus except File and Home from Access options.
    OR you can hide the ribbon entirely.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #6
    JoeJr is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    62
    Okay I got it to work in access 2016 which should also work in 2013 and 2019. I have come to the conclusion that custom ribbons are very touchy. Here is what I have so far and it is working. As I play around with it in my test DB I will continue to post the xml code until I have a full working example with everything placed in the correct position.

    Code:
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    
    
      <ribbon startFromScratch="true">
        <tabs>
          <tab id="tab1" label="TAB 1">
          </tab>
          <tab id="tab0" label="Tab 2"> 
            <group id="grpGroup1" autoScale="false" centerVertically="false" label="Group 0">
              <button id="btn0" size="large" label="Button 0"/>
              <button id="btn1" size="large" label="Button 1"/>
              <button id="btn2" size="large" label="Button 2"/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    
    
      <backstage> 
         <button idMso="FileCloseDatabase" visible="false"/>
         <button idMso="FileSave" visible="false"/>
         <tab idMso="TabInfo" visible="false"/>
         <tab idMso="TabOfficeStart" visible="false"/>
         <tab idMso="TabRecent" visible="false"/>
         <tab idMso="TabSave" visible="false"/>
         <tab idMso="TabPrint" visible="false"/>
         <tab idMso="TabHelp" visible="false"/>
         <button idMso="ApplicationOptionsDialog" visible="true"/>
      </backstage>
    </customUI>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 07-29-2018, 09:09 AM
  2. Setup a query
    By marrisa_o in forum General Chat
    Replies: 2
    Last Post: 06-27-2014, 10:36 AM
  3. vb.net setup
    By rafi in forum Access
    Replies: 1
    Last Post: 08-12-2011, 12:27 AM
  4. Best way to setup
    By griz47 in forum Access
    Replies: 5
    Last Post: 05-17-2011, 12:59 AM
  5. Setup
    By aisza in forum Database Design
    Replies: 6
    Last Post: 05-09-2011, 03:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums