Hiding the File Tab on a Custom Ribbon (1 Viewer)

SmallTime

Registered User.
Local time
Today, 10:58
Joined
Mar 24, 2011
Messages
246
Using 2010 32 bit

I've created a custom ribbon that only opens on report print previews. However, I can't seem to get rid of the File tab on the ribbon which allows access to the backstage and the Privacy Options button which then allows access to various setting that I'd don't want users to change e.g. Current Database, Client Settings, Customize Ribbon and Quick Access Toolbar.

I've saved the database in accde format hoping this would prevent users with full Office installations from being able to make the changes, but this hasn't turned out to be the case. I know if I run the database using runtime it prevents access to these settings but most of my users have full installs. The /runtime switch does the trick as a temp measure but I'm pretty sure some of the more savvy and curious users will soon get itchy fingers.

Does any one know of a more secure way to prevent these changes, or even better still how to hide/disable the FILE tab altogether.


SmallTime
 

Ari

Registered User.
Local time
Today, 10:58
Joined
Oct 22, 2011
Messages
139
Hi

Note how you can disable the content of the backstage area.

...
<!-- *** TAG COMMANDS ***-->
<commands>
<command idMso="Help" enabled = "false"/>
</commands>
<ribbon startFromScratch="true">
...
....
</ribbon>
<!-- *** BACKSTAGE ***-->
<backstage>
<button idMso="FileSave" visible="false"/>
<button idMso="SaveObjectAs" visible="false"/>
<button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileCloseDatabase" 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"/>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileExit" visible="false"/>
</backstage>
</customUI>

Or disable all the ribbon, with this simple command:

docmd.ShowToolbar "ribbon" ,acToolbarNo
 
Last edited:

SmallTime

Registered User.
Local time
Today, 10:58
Joined
Mar 24, 2011
Messages
246
Thanks for the reply.

I'll start playing with your suggestion in a while to see how I can implement it. Must admit I'm fairly new HTML coding and only just starting playing because I had to make a ribbon but ended up coping most (ok all) of the code from http://www.accessribbon.de/. A very, very useful site indeed.

Anyway thanks for your kind help. I'll get back and let you know how I got along tomorrow.

Smalltime
 

Ari

Registered User.
Local time
Today, 10:58
Joined
Oct 22, 2011
Messages
139
Hi Smalltime

If you can not progress to the project, will mount a practical example.

I like the site below, which has a cool videos

ribbon01.com/articles.asp
 

SmallTime

Registered User.
Local time
Today, 10:58
Joined
Mar 24, 2011
Messages
246
Thanks Ari

I'm going have a go myself and see how I get along, might learn a new trick or two, of course without doubt an example of how to disable the backstage and show the print preview ribbon would be most welcome.

Regards
SmallTime
 

SmallTime

Registered User.
Local time
Today, 10:58
Joined
Mar 24, 2011
Messages
246
Ari,

I give up can't get to grips with HML. Would you be kind enough to post the example when you have time. I want the print preview tab available, but with the backstage options disabled.


Many thanks
SmallTime
 

Ari

Registered User.
Local time
Today, 10:58
Joined
Oct 22, 2011
Messages
139
SmallTime,

See the example
 

Attachments

  • SmallTime.zip
    22.4 KB · Views: 2,672

SmallTime

Registered User.
Local time
Today, 10:58
Joined
Mar 24, 2011
Messages
246
Brilliant, just brilliant. Exactly what I was looking for.

Many Thanks
SmallTime
 

Ari

Registered User.
Local time
Today, 10:58
Joined
Oct 22, 2011
Messages
139
Adding a bit more secure.
 

Attachments

  • SmallTimePlus.accdb
    512 KB · Views: 2,045

SmallTime

Registered User.
Local time
Today, 10:58
Joined
Mar 24, 2011
Messages
246
Thanks for the extra bit. In fact I've got an Admin form where I set a number of database startup options, and indeed the Allow shiftByPass is one of them.

Of course looking at the example you've sent I'll be adding another option to change the default Ribbon to Null to accommodate the developer environment and return to rbClean2010 for the final delivery ready ACCDE.

Cheers
SmallTime
 

Users who are viewing this thread

Top Bottom