Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Microsoft Word Macro Help Please

Microsoft Word Macro Help Please
Thread Tools
gulmatan
Dedicated MacNNer
Join Date: Mar 2005
Status: Offline
Reply With Quote
Oct 21, 2007, 11:09 PM
 
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
( Last edited by gulmatan; Oct 21, 2007 at 11:17 PM. )
PowerBook G4 1.5 GHz/1GB RAM/OS/X (10.4.11)
Windows--A fate in league with Communism.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:19 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,