disable/remove File Tab

SmallTime

Registered User.
Local time
Yesterday, 18:18
Joined
Mar 24, 2011
Messages
246
Using 2010


Is there a way of disabling the file tab on the Ribbon or alternatively the ‘Privacy Options’ button in the file tab as this allows the end user to change various settings. I’ve already disabled quite few start-up properties as follows:

Code:
Dim iRetVal As Integer
    DoCmd.ShowToolbar "Ribbon", acToolbarNo
    iRetVal = AddStartupProperty("StartupShowDBWindow", dbBoolean, False)
    iRetVal = AddStartupProperty("AllowSpecialKeys", dbBoolean, False)
    iRetVal = AddStartupProperty("UseMDIMode", dbBoolean, 1)
    iRetVal = AddStartupProperty("Perform Name AutoCorrect", dbLong, 0)
    iRetVal = AddStartupProperty("Track Name AutoCorrect Info", dbLong, 0)
    iRetVal = AddStartupProperty("Auto Compact", dbLong, 0)
    iRetVal = AddStartupProperty("DesignWithData", dbLong, 0)
    iRetVal = AddStartupProperty("AllowDatasheetSchema", dbBoolean, False)
    iRetVal = AddStartupProperty("AllowFullMenus", dbBoolean, False)
    iRetVal = AddStartupProperty("AllowShortcutMenus", dbBoolean, False)
'    iRetVal = AddStartupProperty("AllowBuiltInToolbars", dbBoolean, False)
    iRetVal = AddStartupProperty("AllowToolbarChanges", dbBoolean, False)

I’ve created, or rather borrowed, (can’t recall who from otherwise I’d give the credit) a custom Ribbon which I’m using only in report print previews. I don’t use Ribbons anywhere else as all my forms are button driven. On report Open I’ve set DoCmd.ShowToolbar "Ribbon", acToolbarYes and OnClose DoCmd.ShowToolbar "Ribbon", acToolbarNo.

Even with the custom Ribbon it shows the file tab (see screenshot attached).

Custom Ribbon Xml as follows:

Code:
<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 idMso="GroupPrintPreviewClosePreview" />

               <group id="ListCommands" label="Print">
                 <button idMso="FilePrintQuick" keytip="q" size="large"/>
                <button idMso="PrintDialogAccess" label="Print Dialog" keytip="d" size="large"/>
              <button idMso="FileSendAsAttachment" label="Email Report" 
                           keytip="d" enabled="true" size="large"/>
           </group>
     
             <group id="ExportCmds" keytip="e" label="Save As">
                  <button idMso="PublishToPdfOrEdoc" keytip="p" size="large"/>
                  <button idMso="ExportHtmlDocument" keytip="h" size="large"/>
              <button id="CreateEmail" label="Email Report (R)" 
                    imageMso="FileSendAsAttachment"   enabled="true" size="large"
                    onAction= "=MySend()"/>
                </group>
              <group idMso="GroupZoom"></group>
              <group id="Exit" keytip="x" label="Exit">
              <button idMso="PrintPreviewClose" keytip="c" size="large"/>
             </group>


      </tab>
    </tabs>
  </ribbon>
</customUI>


What else can I do get rid of 'Privacy Options' and properly bullet proof my app?

Regards
SmallTime
 

Attachments

  • PrivacyOption.png
    PrivacyOption.png
    37.3 KB · Views: 366
  • PrintPreview.png
    PrintPreview.png
    51.5 KB · Views: 306
Last edited:
In case someone else wants to do the same, my quick and dirty solution for the time being is to put the startup property changes (above) into the OnClose event on my main menu so that any changes made by the user are overwritten/reset on closure.

BE AWARE that you HAVE to implement a way of returning these settings to the Access default state for the developer. I did it by adding a button that's only visible and enabled when a developer logs on and prevents the code from running on closure.

Now the search is on to find the correct names and datatypes for the other 50 or so settings!

SmallTime
 

Users who are viewing this thread

Back
Top Bottom