Access 2007 ribbons

suepowell

Registered User.
Local time
Today, 14:33
Joined
Mar 25, 2003
Messages
282
HI,

I have customised my ribbon, but want to use the print preview ribbon with my reports. I have found some info on contextual tabs, and have set the following code into the ribbon table, with the ribbon being called as the report is opened.


<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<contextualTabs>
<tabSet idMso="TabSetFormReportExtensibility">
<tab idMso="TabPrintPreviewAccess"/>
</tabSet>
</contextualTabs>
</ribbon>
</customUI>

I am getting the following error
line: 4
column: 52
error code 0x80004005
failed to find office control by id
ID: TabPrintPreviewAccess

I got the tab name from a list of ribbon controls from the microsoft site.
I can open the report, but I don't get the print preview ribbon, can anyone spot my silly mistake.

Thanks

Sue.
 
Sue,

I plugged your XML code into my USysRibbon table in an Access application I have developed an it displays without error. I use the Office 2007 Custom UI Editor to test my XML code for syntax and other errors before pasting it into the USysRibbon table. It found no errors in your code either.

If it's practical, I'd be happy to take a look at your application. You could send a zipped file to kenwarthen at gmail dot com.

Ken
 
Hi Ken,

Thanks for having a look.

I attach a very cut down version with just 1 table and report which still has the error.

I wonder if there is a reference or something I am missing, it must be fairly fundamental as this is a new database with just the one table and report.
 

Attachments

Interestingly, your ribbon works fine on my machine. I believe the only reference required for Ribbon customization is Microsoft Access 12.0 Object Library.

When I did my first ribbon customization I didn't want end users to have access to all of print preview features and functions. I found a lot of helpful information at www.pschmid.net as well as in the Apress press book, Pro Access 2007. I have attached a zip file with a report ribbon example that shows how to implement different report ribbons based on Print Preview and Report View.

Ken
 

Attachments

Users who are viewing this thread

Back
Top Bottom