Print Preview ribbon not displaying when using a custom ribbon

TonyD1016

Board Regular
Joined
Nov 18, 2021
Messages
59
Office Version
  1. 365
Platform
  1. Windows
I am working on a Front End for a split database that restricts functionality to just the form that loads on open. This is my XML for my custom ribbon:

Rich (BB code):
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
 <ribbon startFromScratch="true">

    <qat>
        <sharedControls>
        <control idMso="Undo" visible ="true" />
        <control idMso="Redo" visible ="true" />
        </sharedControls>
    </qat>

    <tabs>

      <tab idMso="TabAddIns"/>
      <tab id="Home" label="Home">

          <group idMso="GroupClipboard"/>  
          <group idMso="GroupFindAccess"/>  
          <group idMso="GroupTextFormatting"/>

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

<backstage>
   <button idMso="FileSave" visible="false"/>
   <button idMso="FileCloseDatabase" 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"/>
   <button idMso="ApplicationOptionsDialog" visible="false"/>
</backstage>

</customUI>

And it works just fine, but the problem is that I have a report that opens in Print Preview mode by default and while that report is open I would like the Print Preview ribbon to be displayed.

I tried setting up a PrintReport custom ribbon that duplicates this except I replace everything under the "Home Tab" with <tab idMso="TabPrintPreviewAccess"/>, but that just causes Access to display the File button and nothing else when I open the report.


How can I utilize this custom ribbon to get the normal Print Preview window to appear when I open this report?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
did you set the ribbon name property (other tab) for the report?
Yes. The tab I posted is set as the default tab for the Database.

The PrintReport ribbon is set as the Ribbon Name property on the Report itself.

...I believe I may have stumbled on the solution though.

I added <tab idMso="TabPrintPreviewAccess"/> to the User Ribbon code that I posted above just underneath the line for the custom Home Tab.
This, along with having it by itself on the PrintReport ribbon, causes only the Print Preview ribbon to be displayed when the report is open just as I wanted it to.

I'm not sure why this works but it has. :)
But thank you very much for your reply.
 
Upvote 0
Solution
The tab I posted is set as the default tab for the Database.
You're referring to a ribbon tab; I was referring to a tab on the property sheet for the report. No matter, glad to see you have a solution and posted it for others.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top