James
asked on
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!
Thanks in advance!
ASKER
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
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
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.
ASKER
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. :)
Coding the callbacks, etc. for each of the functions myself is, ummm, intimidating. :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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:
James
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>
Thoughts?James
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)?
Have you set the Ribbon property of the report to the name of your "print preview" ribbon (whatever that name may be)?
ASKER
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.
I have named the print preview ribbon PrintPreview and put that in the Ribbon Name property of each of my reports.
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