Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    sheusz is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2015
    Posts
    193
    Addendum

    I still have the file menu appearing
    Click image for larger version. 

Name:	Custom Ribbon.jpg 
Views:	21 
Size:	6.6 KB 
ID:	53222

    and I can't see why.

    Code:
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
      <ribbon startFromScratch="true">
        <tabs>
          <tab idMso="TabHomeAccess" visible="false"/>
          <tab id="tabReportPrint" label="Report Print">
            <group id="grpPrint" label="Printing">
              <button id="btnQuickPrint"
                      label="Quick Print"
                      size="large"
                      imageMso="FilePrintQuick"
                      onAction="QuickPrintCallback" />
              <button id="btnExportPDF"
                      label="Export as PDF"
                      size="large"
                      imageMso="FileSaveAsPdfOrXps"
                      onAction="ExportPDFCallback" />
            </group>
          </tab>
        </tabs>
    
        <!-- Empty QAT: greys out QAT strip and blocks customization -->
        <qat/>
      </ribbon>
    
      <!-- Remove Backstage (File menu) options -->
      <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"/>
        <tab idMso="TabInfo" visible="false"/>
        <tab idMso="TabRecent" visible="false"/>
        <tab idMso="TabNew" visible="false"/>
        <tab idMso="TabOpen" visible="false"/>
        <tab idMso="TabSave" visible="false"/>
        <tab idMso="TabPrint" visible="false"/>
        <tab idMso="TabShare" visible="false"/>
        <tab idMso="TabHelp" visible="false"/>
        <tab idMso="TabOptions" visible="false"/>
        <tab idMso="TabClose" visible="false"/>
      </backstage>
    </customUI>


  2. #17
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I discussed the QAT in my security article. Despite a lot of effort I could do nothing beyond disabling the QAT menu items.
    Similarly as already stated, it isn’t possible to remove the File menu item from the ribbon. As already explained you can remove its contents but not the File item itself. It just can’t be done.
    That is why I’m recommending you remove the ribbon and only use it where necessary. Problem then solved!
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #18
    sheusz is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2015
    Posts
    193
    Thanks Colin

    I only use the ribbon for reports and then the File menu appears with Info, Print, Privacy Options and Exit.

    I've tried your code for the ribbon NoPrivacy, however Privacy options still remain, and it's here where users can get in to the DB settings.

    Code:
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">    
     <ribbon startFromScratch="true">    
     </ribbon>    
     <backstage>    
       <button idMso="ApplicationOptionsDialog" visible="false"/>    
     </backstage>    
    </customUI>
    I'd be happy to just be rid of that.

    I've also tried your suggestion of renaming the DB from ACCB to ACCR, but that causes other issues with security notifications popping up on launch, which require registry editing to overcome.

    BTW, I've really enjoyed viewing your resources.

  4. #19
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Privacy options shouldn’t be visible with that ribbon. Perhaps you haven’t followed some of the other steps mentioned in the article?
    Does my example app show the same behaviour as described in my article? If not, what are the differences and what Access /Windows versions do you have?
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  5. #20
    sheusz is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2015
    Posts
    193
    Hi Colin

    Thanks for your patience and input. I've managed to figure out what was going on.

    I've found that if I set the Current Database Ribbon Name to that of my customised ribbon. it works as desired. (this may have been in your article) The Exit button remains but Print,Info and Privacy Options are no longer on the file menu and the QAT has no commands in it.

    Allow Full Menus and Allow Default Shortcut Menus are unchecked and Shortcut Menu Bar is set to Default.

    So my ReportPrintRibbon code now looks like this. The two print buttons now on the ribbon bar are controlled by the global functions I posted earlier.

    <ribbon startFromScratch="true">
    <tabs>
    <tab id="tabReportPrint" label="Report Print">
    <group id="grpPrint" label="Printing">
    <button id="btnQuickPrint"
    label="Print Dialogue"
    size="large"
    imageMso="FilePrintPreview"
    onAction="QuickPrintCallback" />
    <button id="btnExportPDF"
    label="Export as PDF"
    size="large"
    imageMso="FileSaveAsPdf"
    onAction="ExportPDFCallback" />
    </group>
    </tab>
    </tabs>

    <!-- Empty QAT: greys out QAT strip and blocks customization -->
    <qat/>
    </ribbon>

    <!-- Remove Backstage (File menu) options -->
    <backstage>
    <button idMso="ApplicationOptionsDialog" visible="false"/>
    <tab idMso="TabExit" visible ="false"/>
    <tab idMso="TabInfo" visible="false"/>
    <tab idMso="TabRecent" visible="false"/>
    <tab idMso="TabNew" visible="false"/>
    <tab idMso="TabOpen" visible="false"/>
    <tab idMso="TabSave" visible="false"/>
    <tab idMso="TabPrint" visible="false"/>
    <tab idMso="TabShare" visible="false"/>
    <tab idMso="TabHelp" visible="false"/>
    <tab idMso="TabOptions" visible="false"/>
    <tab idMso="TabClose" visible="false"/>
    </backstage>
    </customUI>

    I'm going to see if I can remove the Exit button from the File menu, because it's not clear to the end user that it shuts down the application rather than exiting the current report.

  6. #21
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Yes you can remove the Exit item along with all other items in the File menu backstage view

    The QAT part of the ribbon XML is incorrect. It should be <qat> followed by </qat>
    You have a strange single hybrid of those which ought not to work AFAIK
    Are you saying the QAT menu is also empty or (like my example) populated but disabled?
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  7. #22
    sheusz is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2015
    Posts
    193
    Hi Colin

    Thanks for the reply.

    With the code and procedure I provided in my previous post, this is what the Ribbon, QAT and File menu look like. I'm still working on removing the Exit option from the file menu.

    Click image for larger version. 

Name:	Correct Ribbon etc.jpg 
Views:	14 
Size:	70.4 KB 
ID:	53235

    I agree that the QAT part of the ribbon XML is should be incorrect, but if I change it to be what should be correct,

    Code:
    <!-- Empty QAT: greys out QAT strip and blocks customization -->
        <qat>
        <qat/>
      </ribbon>

    this is the result, which is not what I want.

    Click image for larger version. 

Name:	Incorrect Ribbon etc.jpg 
Views:	14 
Size:	76.1 KB 
ID:	53236

    Like you, I don't think it should work but it does. It was a suggestion made by ChatGPT. I'm currently testing it on various systems to make sure it's not a local phenomenon.

  8. #23
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    The forward slash needs to be before (not after) QAT

    The correct code is
    Code:
    <qat>
    </qat>
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  9. #24
    sheusz is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2015
    Posts
    193
    Quote Originally Posted by isladogs View Post
    The forward slash needs to be before (not after) QAT

    The correct code is
    Code:
    <qat>
    </qat>
    Of course it is. Thank you for your assistance, Colin very much appreciated.

    Here is the revised ribbon code with the Exit command also removed from the File menu.

    Code:
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
      <ribbon startFromScratch="true">
        <tabs>
          <tab id="tabReportPrint" label="Report Print">
            <group id="grpPrint" label="Printing">
              <button id="btnQuickPrint"
                      label="Print Dialogue"
                      size="large"
                      imageMso="FilePrintPreview"
                      onAction="QuickPrintCallback" />
              <button id="btnExportPDF"
                      label="Export as PDF"
                      size="large"
                      imageMso="FileEmailAsPdfEmailAttachment"
                      onAction="ExportPDFCallback" />
              <button id="btnCloseReport"
                      label="Close Report"
                      size="large"
                      imageMso="PrintPreviewClose"
                      onAction="CloseReportCallback" />
            </group>
          </tab>
        </tabs>
    
        <!-- Empty QAT: greys out QAT strip and blocks customization -->
        <qat>
        </qat>
      </ribbon>
    
      <!-- Remove Backstage (File menu) options -->
      <backstage>
        <button idMso="ApplicationOptionsDialog" visible="false"/>
        <tab idMso="TabInfo" visible="false"/>
        <tab idMso="TabRecent" visible="false"/>
        <tab idMso="TabNew" visible="false"/>
        <tab idMso="TabOpen" visible="false"/>
        <tab idMso="TabSave" visible="false"/>
        <tab idMso="TabPrint" visible="false"/>
        <tab idMso="TabShare" visible="false"/>
        <tab idMso="TabHelp" visible="false"/>
        <tab idMso="TabOptions" visible="false"/>
        <tab idMso="TabClose" visible="false"/>
    
        <!-- This line hides the actual Exit button -->
        <button idMso="FileExit" visible="false"/>
      </backstage>
    </customUI>

  10. #25
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Excellent. You got there!
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 08-19-2021, 06:34 PM
  2. Options Options Dialog
    By Mister-B in forum Modules
    Replies: 2
    Last Post: 05-10-2020, 01:07 AM
  3. Hiding/Disabling Toolbars and Editing Options
    By Torinjr in forum Security
    Replies: 4
    Last Post: 05-05-2015, 07:49 PM
  4. Replies: 6
    Last Post: 10-26-2012, 09:28 AM
  5. I can't see the menu options in Ms Access 2010.
    By dave_joseph in forum Access
    Replies: 2
    Last Post: 10-27-2011, 03:11 AM

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