To be really honest, I would consider hiding the ribbon, but showing it for
reports.
The reason is you have email, save as pdf, export to Excel and several other
print options.
I just think all these "additional" options are well worth having a ribbon -
especially now that we print less and less.
I just think having so many nice options tends to off set the cost of screen
space - and with ribbon minimized, then you don't take up that much space
anyway.
I really like having options like email as PDF attachment etc. So creating
PDF or email makes sense as opposed to using a printer and paper.
So if you set a report ribbon set for all reports - the rest of the
application will always hide the ribbon for you and only show report +
ribbon when you need without any VBA code on your part.
However, YES, you can just have the QAT.
You could probably just set the QAT, but then back stage stuff would show.
This sample hides more then you want, but it should do the trick:
Note that this ribbon since it has QAT must be SET AS MAIN application wide
ribbon.
Setting this ribbon for a form or report will NOT work.
The QAT and backstage xml commands can ONLY be in the system wide ribbon -
such commands are ignored when set as a form or report ribbon.
You also need a public VBA function for the "exit" command in backstage:
I use this:
Public Function MyCloseBack()
SendKeys "{esc}"
End Function
And the ribbon that gives you a QAT with print is this:
<customUI xmlns="
http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<qat>
<documentControls>
<control idMso="Undo"/>
<control idMso="Redo" />
<control idMso="FilePrintMenu" />
<control idMso="PrintDialogAccess" />
</documentControls>
</qat>
</ribbon>
<backstage>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileSave" visible="false"/>
<button idMso="SaveObjectAs" visible="false"/>
<button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileCloseDatabase" visible="false"/>
<tab idMso="TabInfo" visible="false"/>
<tab idMso="TabRecent" visible="false"/>
<tab idMso="TabNew" visible="false"/>
<tab idMso="TabPrint" visible="true"/>
<tab idMso="TabShare" visible="false"/>
<tab idMso="TabHelp" visible="false"/>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button id="MyExit" label="Back"
imageMso="ProposeNewTime"
onAction="=MyCloseBack()"
/>
<button idMso="FileExit" visible="true"/>
</backstage>
</customUI>
Note that I have two print options in the QAT - try them both and see which
one you like better (one has a drop down of print options and the other is
JUST the print dialog box).
best regards,
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
PleaseNoS...@msn.com
"
dgar...@NOSPAM.dgtraining.net" wrote in message
news:d331d45e-92a9-44bb...@g8g2000yqa.googlegroups.com...