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!
jrmcanada2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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:

http://msdn.microsoft.com/en-us/library/ff862537(v=office.14).aspx
0
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?

James
0
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.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

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. :)
0
Scott McDaniel (Microsoft Access MVP - EE MVE )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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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">
      <tabs>
         <tab id="TabPrintPreviewAccess" label="Print Preview">
         </tab>
         <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" />
                  </menu>
               </splitButton>
            </group>
         </tab>
      </tabs>
   </ribbon>
</customUI>

Open in new window

Thoughts?

James
0
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)?
0
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.