Hi all,
I'm trying to devise a macro that expands the active window to the screen size BUT, here's where I'm stuck: depending on the toolbars on top of the screen, I want the top of the zoomed window just below the lowest toolbar--i.e. if I have two rows of toolbars, the top of my zoomed document window should be just below that toolbar on second row. The way I have it now is the zoom macro places the top of the document window just below the first row toolbar. Thus, If I have a toolbar on the second row, the document's title bar is covered up by the second row of tools.
So, what VisualBasic code do i need that places the Zoomed window just below the toolbar on the second row?
Here's what I have so far:
Sub MadMax()
'
' MadMax Macro
'
With ActiveWindow
If System.OperatingSystem = "Macintosh" Then
horiz = System.HorizontalResolution
vert = System.VerticalResolution
If CommandBars("Reviewing").Visible = True Then
.Width = horiz - 5
Else
.Width = horiz - 5
End If
.Height = vert - 90
'ORIGINAL COMMAND--.Height = vert - 60
End If
ActiveWindow.ActivePane.View.Zoom.Percentage = 125
End With
If CommandBars("Drawing").Visible = True Then
CommandBars("Drawing").Visible = False
CommandBars("Drawing").Visible = True
End If
End Sub