What is the idMso for the New button in Access 365 backstage File menu?

David Anderson

Registered User.
Local time
Today, 21:52
Joined
Nov 18, 2007
Messages
84
I have hidden most of the contents of the File menu in Access 365 using the code below, but I would also like to hide the New button. Can anyone provide the idMso for this button?

Code:
 <backstage>
   <button idMso="FileSave" visible="false"/>  
   <button idMso="FileCloseDatabase" visible="false"/>
   <tab idMso="TabOfficeFeedback" visible="false"/>
   <tab idMso="TabSave" visible="false"/>
   <tab idMso="TabInfo" visible="false"/>
   <tab idMso="TabRecent" visible="false"/>  
   <tab idMso="TabPrint" visible="false"/>  
   <tab idMso="TabHelp" visible="false"/>  
</backstage>
 
Last edited:
Its possible to hide all items on the backstage (File) menu. For info on all the commands needed, see my article
 
Its possible to hide all items on the backstage (File) menu. For info on all the commands needed, see my article
Hi Colin. As it happens, I already have a link to your website in a new Word document I created to store useful information about custom ribbons.

However, I failed to find any code to hide the one remaining item I wish to remove from my Access 365 backstage (the Home tab). I downloaded your SYD_v1.7.accdb demo database, but it doesn't contain a USysRibbons table. What's the secret sauce for hiding that tab (or button)?
 
USysRibbons is a hidden system table. Tick both checkboxes in navigations options to view it

This is the XML for the SimpleFile ribbon mentioned in the article:

Code:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
  <ribbon startFromScratch="true">
<tabs>
   <tab idMso="TabHomeAccess" visible="false" />
</tabs>
  </ribbon>
  <backstage>
   <tab idMso ="TabPrint" visible="false"/>
   <button idMso="ApplicationOptionsDialog" visible="false"/>
   <button idMso="FileExit" visible="false"/>
   <tab idMso="TabOfficeFeedback" visible="false"/>
   <tab idMso="TabInfo" visible="false"/>
  </backstage>
</customUI>

The backstage refers to the File menu only
As the entire Home tab is to be hidden, the command is in the Tabs section
 
The Home tab in the main menu is already hidden by using:

Code:
<ribbon startFromScratch="true">

I'm trying to remove the Home button in the File menu. Adding the following line to the tabs section doesn't achieve this for me.

Code:
<tab idMso="TabHomeAccess" visible="false" />
 
Apologies. You are correct. I should have checked properly before replying
I'm busy at the moment so please do the following

Try saving the code I gave earlier to another custom ribbon. Open & close twice.
That should remove all items from the File menu providing you first apply other changes in Access Options as described in my article.

If that still doesn't work, please post your entire ribbon code rather than just the parts you showed in posts #1 & #2
Or better still, post a cut down version of your database for testing
 
I updated my USysRibbons table with your SimpleFile ribbon, but it appears to have been designed for a different version of Access. It generated an error for the FileExit entry, as that button doesn't exist in my version of Access 365, and it lacked any entries for several tabs and buttons that do exist. In case it's relevant, I'm using Windows 11.

The backstage code shown below clears everything from my File menu except Options (which I want to keep) and Home (which I don't yet know how to hide).

Code:
<customUI
xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="ribbonLoaded">
  <ribbon startFromScratch="true">
    <tabs>
    <tab idMso="TabCreate" visible="false"/>
    <tab idMso="TabPrintPreviewAccess" visible="false"/>
    <tab id="MyTab" label="Printing" visible="true">
       <group id="gReportOptions" label=" " getVisible="gReportOptions_GetVisible">         
          <button idMso="PrintDialogAccess" size="large"/>
        <separator id="mySeparator1" />       
          <button idMso="PrintPreviewClose" size="large"/>         
      </group>
    </tab>
    </tabs>
  </ribbon>
 <backstage>
   <button idMso="FileSave" visible="false"/>   
   <button idMso="FileCloseDatabase" visible="false"/>   
   <tab idMso="TabOfficeStart" visible="false"/>
   <tab idMso="TabOfficeFeedback" visible="false"/>
   <tab idMso="TabSave" visible="false"/>
   <tab idMso="TabInfo" visible="false"/>
   <tab idMso="TabRecent" visible="false"/>   
   <tab idMso="TabPrint" visible="false"/>   
   <tab idMso="TabHelp" visible="false"/>   
  </backstage>
</customUI>
 
I'm trying to remove the Home button in the File menu.
I haven't read all the posts and it may have been suggested earlier. I didn't have the time to read all the posts carefully.
We have the following in our xml of all our applications.
It clears everything in backstage.
Code:
<backstage>
    <button idMso="FileSave" visible="false"/>
    <tab idMso="PlaceTabHome" 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"/>
    <tab idMso="TabPrint" visible="false"/>
    <tab idMso="TabOfficeFeedback" visible="false"/>
    <button idMso="ApplicationOptionsDialog" visible="false"/>

Then we add several tabs and show and allow the user to change application options.
Each user can go to backstage, change FE's options and settings and customize the FE per his/her needs.
For example FE's language, paths to different folders, forms search behavior and a lot more.
Access adds the vertical scroll bar if the amount of options doesn't fit in a page.
this is from one of our simplest databases


2023-10-25_06-25-35.png
 
Last edited:
Thanks, KitaYama. You have solved my problem with the following line of code. The Home tab in the File menu has now been hidden :)

Code:
<tab idMso="PlaceTabHome" visible="false"/>

My full backstage coding is now as follows. As I wanted, only the Options tab is visible.

Code:
 <backstage>
   <button idMso="FileSave" visible="false"/>   
   <button idMso="FileCloseDatabase" visible="false"/>   
   <tab idMso="PlaceTabHome" visible="false"/>   
   <tab idMso="TabOfficeStart" visible="false"/>
   <tab idMso="TabOfficeFeedback" visible="false"/>
   <tab idMso="TabSave" visible="false"/>
   <tab idMso="TabInfo" visible="false"/>
   <tab idMso="TabRecent" visible="false"/>   
   <tab idMso="TabPrint" visible="false"/>   
   <tab idMso="TabHelp" visible="false"/>   
  </backstage>
 
My SimpleFile ribbon was designed to work in all versions from A2010 to A365

I expect you saw an error similar to this:
1698184123254.png

You can prevent error messages for items not present in a specific version by unchecking Show Add-In user interface errors in Options. . . Client Settings

My XML code only includes items that need to be hidden using code. The items omitted such as the Home button on the Backstage menu are already removed by other means,

@KitaYama suggests using this line <tab idMso="PlaceTabHome" visible="false"/>
That didn't work for me but unticking Allow Full Menus in Access Options does remove it (and other items)

If you want to limit end users options by redcing the Access ribbon and backstage view then it is counter-productive to retain the Options menu as that allows end users to revverse any changes you have made
 
My SimpleFile ribbon was designed to work in all versions from A2010 to A365

I expect you saw an error similar to this:
View attachment 110552
You can prevent error messages for items not present in a specific version by unchecking Show Add-In user interface errors in Options. . . Client Settings

My XML code only includes items that need to be hidden using code. The items omitted such as the Home button on the Backstage menu are already removed by other means,

@KitaYama suggests using this line <tab idMso="PlaceTabHome" visible="false"/>
That didn't work for me but unticking Allow Full Menus in Access Options does remove it (and other items)

If you want to limit end users options by redcing the Access ribbon and backstage view then it is counter-productive to retain the Options menu as that allows end users to revverse any changes you have made

This address label printing database is only for use at home by my wife and myself. She is not very computer savvy, so I was aiming for the simplest possible interface. Total lock down is not necessary, and retaining the Options tab makes it easier for me to make changes.

I aim to make my code as self-explanatory as possible, so that if a year or two passes before I look at it again it is easier for me to remember
my original thought processes. For this reason, I think I might prefer my backstage code to contain an explicit list of items to be hidden rather than depending on the 'Allow Full Menus' option (which I've never used before). However, I will experiment with using that option to see if it is a simpler way to achieve my objectives without creating new problems in my situation.

I have no need to code for any other version than Access 365, so it just seems safer to keep the 'Show Add-In user interface errors' option.

It seems odd that <tab idMso="PlaceTabHome" visible="false"/> works for KitaYama and me, but not for you.
 
For the situation you describe I would go for a much simpler solution. Just hide the ribbon completely and put all required functionality on the various forms.
Or go one stage further and hide the application interface completely
 
For the situation you describe I would go for a much simpler solution. Just hide the ribbon completely and put all required functionality on the various forms.
Or go one stage further and hide the application interface completely

I've just downloaded your 'Control the Application Interface' demo database and will have a look at your ideas of either hiding the ribbon or the complete Access interface.

However, at present I'm making use of the standard Print and Close Print Preview processes. It might take a bit of effort to recreate that functionality on a form.

 
No need to recreate anything. The example app shows how the print preview ribbon can be restored as and when needed.
 

Users who are viewing this thread

Back
Top Bottom