Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

hide ribbon but show Quick Access Toolbar

1,545 views
Skip to first unread message

debora...@gmail.com

unread,
May 31, 2013, 11:21:08 AM5/31/13
to
The ribbon takes up a lot of screen real estate so I want to hide the
ribbon. When I use a Print Preview button on a form to open a report,
there is no way to print it. I can have the users close the report and
then click another button to print it but I think the users will just
be confused.

Is there a way to open a report with the ribbon hidden but the Quick
Access Toolbar only showing?

Thank you.

PW

unread,
May 31, 2013, 10:31:44 PM5/31/13
to
I am not sure if I am answering your question, but....

You can create a custom print ribbon in XML, create a new record in
USysRibbons, copy the code, and then specify it under the other tab
of the properties window for that report (Ribbon Name). That will
hide/switch the main ribbon when the report is in preview mode.

You can create a QAT ribbon like here:
http://www.accessribbon.de/en/?Access_-_Ribbons:Ribbon_XML___Controls:QAT

I am not sure if it is possible to hide a ribbon, but I think I have
done it but I can't remember how right now.

Here is some XML code for a print ribbon:

<customUI
xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="MyReport" label="Report Print and View Options">

<group idMso="GroupPrintPreviewPrintAccess" />
<group idMso="GroupPageLayoutAccess" />
<group idMso="GroupZoom" />


<group id="ListCommands" label="Print">
<button idMso="FilePrintQuick" keytip="q" size="large"/>
<button idMso="PrintDialogAccess"
label="Print Dialog"
keytip="d" size="large"/>
</group>

<group id="ExportCmds" keytip="e" label="Data Export">
<button idMso="PublishToPdfOrEdoc" keytip="p" size="large"/>

<button id="ExportExcel" label="Excel"
imageMso="ExportExcel" size="large"
onAction="=MyExport('XLS')"/>

<button id="ExportWord" label="Word"
imageMso="ExportWord" size="large"
onAction="=MyExport('RTF')"/>

<button id="ExportTextFile" label="Text"
imageMso="ExportTextFile" size="large"
onAction="=MyExport('TXT')"/>

<button id="ExportHtml" label="HTML Document"
imageMso="ExportHtmlDocument" size="large"
onAction="=MyExport('TXT')"/>

<button id="CreateEmail" label="Email Report (PDF)"
imageMso="FileSendAsAttachment"
enabled="true" size="large"
onAction= "=MySend()"/>
</group>


<group idMso="GroupZoom"></group>

<group id="Exit" keytip="x" label="Exit">
<button idMso="PrintPreviewClose" keytip="c" size="large"/>
</group>

</tab>
</tabs>
</ribbon>
</customUI

Albert D. Kallal

unread,
Jun 1, 2013, 8:39:13 PM6/1/13
to
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...

Patrick Finucane

unread,
Jun 2, 2013, 8:45:39 AM6/2/13
to
I am very surprised the print preview does not allow you to print in your app. That makes no sense, actually.

Albert D. Kallal

unread,
Jun 2, 2013, 2:40:20 PM6/2/13
to
"Patrick Finucane" wrote in message
news:0b0bf8a1-be4c-4d94...@googlegroups.com...

On Friday, May 31, 2013 10:21:08 AM UTC-5, dgar...@NOSPAM.dgtraining.net
wrote:
>
>I am very surprised the print preview does not allow you to print in your
>app. That makes no sense, actually.

Hi Patrick,

My spider sense says the user is hiding the ribbon on startup.

Without a ribbon, then you don't have any user interface parts active with a
print button.

However, even in above, the user "should" have use of what we call backstage
(file->print).

However, it is possible that this poster is hiding all of the back stage.

As a result then when launching a report without a ribbon - the user will
not have a print option.

Here is a screen shot of a report using my custom ribbon:

https://bkafvq.sn2.livefilestore.com/y2pzfwFK2OQ5Xsux1pfI9jP96leOc9ctjviYDHKSD_s-gkx6aN4JO1dFr7kb48MuBIzRtpNmEjGNXmvXWxLgmecbM46hrRr84JMfgWOrmRaK9fTxA9jYf4cIwk1DXZFjHnU/printex.png


View the above picture full screen - you get an idea of what Access looks
like with the ribbon hidden in report view.

Note the 2 print options on the QAT as per my custom ribbon. As noted I
assume one would modify my sample ribbon to remove one of the print options
(one has a drop down of options).

As noted, my suggesting is to actually set a ribbon for reports since there
so many "great" options such as save to PDF, email as PDF attachment etc.
When closing such reports then the ribbon will thus hide (since the system
wide ribbon such as I posted will hide the ribbon).

Anyway, for people here who not seen what Access looks like with a hidden
UI, take a quick look at the above screen shot.

As a report with a full ribbon looks like this:

https://zvkgwa.sn2.livefilestore.com/y2p0FLtKEgEwIjRHDLMwBnIG2gHeUttOmcp6KHDk_qdjAnxyiUcTvffYFDdrFUbibG63mrXiKaC-kGzh5W7-6cmoZ5lhZpTVE9TlwvBr6irnQUI1CCZiPtVNDkkRth6Qs1L/reportrib.png

Best regards,

Patrick Finucane

unread,
Jun 2, 2013, 10:02:39 PM6/2/13
to
Good catch, Albert. Oftentimes people that have problems think others can mindread their issues.

debora...@gmail.com

unread,
Jun 6, 2013, 1:44:36 PM6/6/13
to
I am hiding the ribbon at start up. I do agree that there are a lot of nice features but, alas, the primary user will just be confused. I will try your solutions. In the meantime, I created a little form that pops up with the report and allows the user to print. Then the close button closes the report and the pop-up form. Not as elegant as your solutions, but it will take me a while and a lot of trial and error to implement them. I especially like the screenshot.

Many thanks for all of your responses. I have been away from this group for quite a while and am pleased to see that it is still active. I remember many of your names from when I first started working with Access. Glad to see so many of you still contribute.

Albert D. Kallal

unread,
Jun 8, 2013, 4:00:13 PM6/8/13
to
"dgar...@NOSPAM.dgtraining.net" wrote in message
news:a0c8e596-4cfd-4269...@googlegroups.com...
>
>I am hiding the ribbon at start up.
>

Ok, the sample I posted does hide the ribbon.

>Many thanks for all of your responses. I have been away from this group for
>quite a while and am pleased to see that it is still active.
> I remember many of your names from when I first started working with
> Access. Glad to see so many of you still contribute.

You are most welcome - there does seem to be a recent up-tick in activity
here and I not sure why, but we have been keeping the lights on here so to
speak!

emily....@inmar.com

unread,
Jun 5, 2019, 2:39:15 PM6/5/19
to
Contextures has an interesting and helpful article on this:

https://www.contextures.com/excelribbonaddcustomtab.html

--


********************************************



 

*Inmar Confidentiality
Note*:  This e-mail and any attachments are confidential and intended to be
viewed and used solely by the intended recipient.  If you are not the
intended recipient, be aware that any disclosure, dissemination,
distribution, copying or use of this e-mail or any attachment is
prohibited.  If you received this e-mail in error, please notify us
immediately by returning it to the sender and delete this copy and all
attachments from your system and destroy any printed copies.  Thank you for
your cooperation.



 

*Notice of Protected Rights*:  The removal of any
copyright, trademark, or proprietary legend contained in this e-mail or any
attachment is prohibited without the express, written permission of Inmar,
Inc.  Furthermore, the intended recipient must maintain all copyright
notices, trademarks, and proprietary legends within this e-mail and any
attachments in their original form and location if the e-mail or any
attachments are reproduced, printed or distributed.

 


********************************************
0 new messages