Displaying Print Preview tab with a custom ribbon

I've created an Access 2010 database with a custom ribbon. Is there a way for me to add the standard Print Preview tab to my ribbon and have it default to that tab whenever a report is opened?

Thanks in advance!
Who is Participating?
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
If you're using RibbonCreator all that is handled for you. The utility will create the callbacks, XML, etc.

I believe you can enable "Show Standard Ribbons" in RC, and then select the "TabPrintPreviewAccess" in the "Insert" section of the "Tabs" tab, and that will add it to your ribbon. You could include ONLY that item in your ribbon, and then set the Ribbon property of your item in Access to your newly created custom ribbon.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You can set the Ribbon for specific items in the database.

To do that, create a Custom ribbon, save it in the database. Then open the report in Design view, open the Property Sheet, select Other - Ribbon Name, and select your new menu.

Creating ribbons can be tricky. Many are using Ribbon Creator (http://www.ribboncreator2010.de/en/). That's also a great resource for all things ribbon.

Essentially, you create the XML for the ribbon, then add that to the USysRibbons table (which you must create, unless it's already there). Then close and reopen the database, and you should see the new ribbon in the listing in the Property sheet.

Here's the MSFT page for ribbons:

jrmcanada2Author Commented:
Hi again,

I have Ribbon Creator and that is what I used to create my custom ribbon. At this point, my custom ribbon only has shortcuts to open forms and reports. That's all working fine.

But once a report is opened, I'd like the Print Preview ribbon that is standard with Access to pop up. Is there a way I can do that easily or do I have to rebuild my own Print Preview tab?

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I don't think you can show only portions of the builtin ribbons. You would need to create your own custom ribbon that shows the builtin commands, and set your report to show that custom ribbon.
jrmcanada2Author Commented:
Can anyone provide me with a custom ribbon that duplicates the standard Print Preview tab from Access 2010's built-in ribbon?

Coding the callbacks, etc. for each of the functions myself is, ummm, intimidating. :)
jrmcanada2Author Commented:
Hi again,

I'm running into a small problem with this. When I am working on the .accdb version of my database, this works just fine to bring up the default Print Preview ribbon. But as soon as I compile it into an .accde file, the Print Preview ribbon doesn't show.

Here's the code I used for the default ribbon:

<customUI xmlns="[url="http://schemas.microsoft.com/office/2006/01/customui"]http://schemas.microsoft.com/office/2006/01/customui[/url]">
   <ribbon startFromScratch="true">
         <tab id="TabPrintPreviewAccess" label="Print Preview">
         <tab id="tabSheet" label="Print Forms">
            <group id="MyGroup" label="Sample Split button">
               <splitButton id="sbAdvances" size="large">
                  <button id="ManageAdvances" imageMso="AccessTableContacts" label="Manage Advances"/>
                  <menu id="sbMenusAdvances" supertip="Manage Staff Advances.">
                     <button id="cmdAdvance" label="Advances" imageMso="AccessTableContacts" onAction="OnActionButton" />
                     <button id="cmdAccountedforAdvance" label="Accounted For Advance" imageMso="AccessTableContacts" onAction="OnActionButton" />
                     <button id="cmdAccountingForAdvance" label="Accounting For Advance" imageMso="AccessTableContacts" onAction="OnActionButton" />
                     <button id="cmdCheckingAccountabilities" label="Check Accountabilities" imageMso="AccessTableContacts" onAction="OnActionButton" getEnabled="OnGetEnabled" />

Open in new window


Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Do you have other ribbons that show?

Have you set the Ribbon property of the report to the name of your "print preview" ribbon (whatever that name may be)?
jrmcanada2Author Commented:
In File / Options / Current database, I have set Ribbon Name to "MainMenu" (which is my custom ribbon). That works fine and that ribbon displays when the database is opened.

I have named the print preview ribbon PrintPreview and put that in the Ribbon Name property of each of my reports.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.