[AccessD] Show the print preview ribbon

Stuart McLachlan stuart at lexacorp.com.pg
Sat Mar 1 03:40:20 CST 2014


Check the archives 8 and 9 feb 2013 where this was discussed under the subject 

"A2012 Ribbon collapse (not hide) from code"

( Despite it's name, the following command doesn't Minimze per se, it  toggles the Minimized 
state)

So to maximize the ribbon on open if it is minimized, minimize it on close if it is maximized:


Private Sub Report_Load()
If CommandBars.GetPressedMso("MinimizeRibbon") Then
    CommandBars.ExecuteMso "MinimizeRibbon"
End If
End Sub


Private Sub Report_Close()
If Not CommandBars.GetPressedMso("MinimizeRibbon") Then
    CommandBars.ExecuteMso "MinimizeRibbon"
End If
End Sub




On 28 Feb 2014 at 22:12, Rocky Smolin wrote:

> Any way to maximize the ribbon?  I'd like to maximize the Print
> Preview ribbon in the open even of a report.
> 
> Tia
> 
> r 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Anita Smith
> Sent: Friday, February 28, 2014 6:49 PM To: Access Developers
> discussion and problem solving Subject: Re: [AccessD] Show the print
> preview ribbon
> 
> Rocky,
> I've been using a version of this to minimize the ribbon for a while
> and have not had any problems with it so far. 
> 
> Public Function MinimizeRibbon(Optional ByVal blnMakeMin As Boolean =
> True) As Boolean Dim blnIsMin As Boolean
> 
>     If Application.CommandBars.Item("Ribbon").Height > 80 Then
>         blnIsMin = False
>     Else
>         blnIsMin = True
>     End If
>     If blnMakeMin = blnIsMin Then
>     Else
>         SendKeys "^{F1}", True
>     End If
>     MinimizeRibbon = True
> End Function
> 
> Anita Smith
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky
> Smolin Sent: Saturday, 1 March 2014 10:23 AM To: 'Access Developers
> discussion and problem solving' Subject: [AccessD] Show the print
> preview ribbon
> 
> Dear List:
> 
> In an mdb I have a custom toolbar for print previews which had just
> the close button and the magnifying glass.  In 2003 this works well
> but in 2007, 10 and 13 the custom toolbar does not show up.  Not
> surprising.
> 
> But in 2010 - my client's version - there is a print preview button at
> the top when you're in print preview, and when you click it, the print
> preview ribbon is displayed with the CLOSE in red.  Very good.  
> 
> But the client does not want to click Print Preview to open the
> ribbon.  He wants the ribbon displayed when the report opens in print
> preview.  
> 
> How is this done?
> 
> MTIA
> 
> Rocky
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list