Word 2004 annoyance: toolbars resize windows and don't put them backagain

  • Thread starter Matthew Stevens
  • Start date
M

Matthew Stevens

This one has occurred since Word 98 and is no different in Word 2004.
You need a special function, so a toolbar appears at the top of the
screen. MS Word resizes the window down to accommodate this toolbar. You
close the toolbar and the document window remains short. So you have to
manually re-extend it again to the bottom of the screen. This is
especially annoying when I am displaying a full page on-screen: the
bottom text becomes obscured, so I have to enlarge the window again just
to get back to how things were before MS Word "helpfully" intervened,
then left without closing the fridge door.

A workaround is to open each toolbar in turn and resize it so it then
opens as a panel to the side. Does anyone have a better solution?
 
C

CyberTaz

Hi Matthew -

Basically the same as yours, but perhaps a little less time-consuming -
go into the Customize dialog box *first* & put a check in the boxes for
*all* toolbars on the Toolbars page. Arrange the tb's & doc window as
you wish, then use the same dialog to remove checks for any you don't
want to remain active.

HTH |:>)
 
J

JE McGimpsey

Daiya Mitchell said:
Mine just looks like this, but of course the pixel numbers are going to be
different on every machine.

Sub WindowSize()
With ActiveWindow
.Width = 634
.Height = 792
End With
End Sub

If you wanted it to be machine independent, you could use something like
this:

Public Sub WindowSize2()
Const cnBOTTOMMARGIN As Long = 25
Const cnRIGHTMARGIN As Long = 50
With ActiveWindow
.Left = 0
.Top = 0
.Width = Application.UsableWidth - cnRIGHTMARGIN
.Height = Application.UsableHeight - cnBOTTOMMARGIN
End With
End Sub

which sets a margin at the right and bottom. You could set either to 0
if you don't wish to have a margin.

It also doesn't matter how many toolbars you have docked, or whether
they're docked at the top, bottom, left or right.
 
M

Matthew Stevens

Daiya said:
I've got a macro that resizes the active window to my preferred size in one
click on the toolbar. You could record something like that.

Mine just looks like this, but of course the pixel numbers are going to be
different on every machine.

Sub WindowSize()
With ActiveWindow
.Width = 634
.Height = 792
End With
End Sub

Can this be modified to specify a distance from the left edge of the
screen as well? (I have a 20" monitor, and documents on the far left are
awkward to read when I'm positioned in the centre of the screen.
 
D

Daiya Mitchell

Can this be modified to specify a distance from the left edge of the
screen as well? (I have a 20" monitor, and documents on the far left are
awkward to read when I'm positioned in the centre of the screen.

I'm sure something can be....my macro didn't change the location of the top
left corner at all. JE's macro in this thread is more flexible--I think
that the Left and Top =0 numbers set the top left corner of the document, so
changing them from 0 should do what you want.

Or try recording a macro while adjusting a window to your preferred size and
location.

You should be able to get new documents to launch in that position, I think,
if that where's all the documents are when you close Word.
 
J

JE McGimpsey

Daiya Mitchell said:
I'm sure something can be....my macro didn't change the location of the top
left corner at all. JE's macro in this thread is more flexible--I think
that the Left and Top =0 numbers set the top left corner of the document, so
changing them from 0 should do what you want.

Just slightly more complicated:

Public Sub WindowSize2()
Const cnTOPMARGIN As Long = 0
Const cnLEFTMARGIN As Long = 10
Const cnBOTTOMMARGIN As Long = 25
Const cnRIGHTMARGIN As Long = 50
With ActiveWindow
.Left = cnLEFTMARGIN
.Top = cnTOPMARGIN
.Width = Application.UsableWidth - _
(cnRIGHTMARGIN + cnLEFTMARGIN)
.Height = Application.UsableHeight - (
cnBOTTOMMARGIN + cnTOPMARGIN)
End With
End Sub
 
D

Daiya Mitchell

Just to clarify, JE:

So Margin is the distance between the edge of the Word window and the edge
of the screen? And one simply switches in the desired constants? What are
those constants measured in?

Daiya
 
J

JE McGimpsey

Daiya Mitchell said:
Just to clarify, JE:

So Margin is the distance between the edge of the Word window and the edge
of the screen? And one simply switches in the desired constants? What are
those constants measured in?

Thanks, Daiya - it's become so automatic for me that I forget to give an
adequate explanation.

The margins in my code are measured in points, as are the values that
the UsableWidth and UsableHeight properties return.

Left and right margins will be from the edge of the screen.

Top and bottom margins will be from any docked toolbars. So if you have
a toolbar 25 points high, docked on the bottom of the screen, and you
set the bottom margin to 25, the bottom of the window will be 50 points
above the bottom of the screen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top