Okay, macros for default window properties:
To make a macro run automatically on every new doc, it must be named
AutoNew. To make a macro run automatically on every doc that is opened, it
must be named AutoOpen.
So, usually, your AutoNew and AutoOpen macros would be identical, to affect
every doc you ever see. Save them in Normal or some other global template,
no need to assign to a keyboard or toolbar.
One method in this case:
Since the position and size will be hard coded and adjusted to your monitor,
resolution size, zoom preference, dock position/size, etc, the easiest way
to get the numbers you require will be to record the macro. For instance,
here's a random assortment that I got, and what the macro might look like:
Sub AutoOpen
With ActiveWindow
.Left = 6
.Top = 2
.Width = 479
.Height = 797
End With
End Sub
When you record the macro, I'm not sure if you can name it AutoOpen. If you
can, you might just do that and then repeat the process for AutoNew. (I'm
not willing to mess up my AutoOpen/New macros by testing this. Also, if you
already have AutoOpen/New macros, that might overwrite them, you might check
first). I think you can only have one AutoOpen macro, but it can combine as
many settings as you want (see example below).
So, if you can't name it AutoOpen straight out, then just record it under
any name, e.g. testwindowsize. See Help topic: "Record a Macro" for help
with that. After recording the macro, use Tools | Macros... To see the list,
select your new macro, and click Edit. That will flip you into the Visual
Basic Editor and give you the macro text you need. Change the name of the
macro to Sub AutoNew, then copy the entire macro, paste it, and change the
name of the copy to Sub AutoOpen.
If these directions are confusing, post back with the glitches you ran
into--there are some general references on installing macros here:
http://word.mvps.org/Mac/InstallMacro.html
http://word.mvps.org/Mac/VisualBasicEditor.html
They don't cover this exact case, but could be used to clarify, probably,
rather than wait for an answer.
Daiya
PS. More about forcing window and other preferences below:
Related info‹
my usual AutoOpen and AutoNew macros set View and Zoom, not window position
or size, if anything wants something like this. These commands could be
combined with the sizing/position commands, as in the first example:
Sub AutoNew()
With ActiveWindow.View
.Type = wdNormalView
.Zoom.Percentage = 125
.TableGridlines = True
End With
With ActiveWindow
.Left = 6
.Top = 2
.Width = 479
.Height = 797
End With
End Sub
Sub AutoOpen()
With ActiveWindow.View
.Type = wdNormalView
.Zoom.Percentage = 125
.TableGridlines = True
End With
End Sub
Related Info--
Set the Arrange All menu command to tile windows vertically
http://www.mcgimpsey.com/macoffice/word/verticalwindows.html
Related Info‹
Global Templates
http://www.mcgimpsey.com/macoffice/word/globaltemplate.html
Related Info‹
an AutoExec macro will run every time you *launch* Word. This is good for
making sure application-level preferences always stay set to your liking.