Word is designed to open each document at the size you last saved it at.
To set this globally, close all other documents, open the Normal.dotm, set
the size you want, add and remove a space to force a save, then save
Normal.dotm and quit Word.
If it doesn't hold, you may have corrupt preferences.
Cheers
On 5/12/09 2:18 PM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
The email below is my business email -- Please do not email me about forum
matters unless I ask you to; or unless you intend to pay!
John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:jo...@mcghie.name
here's a suggestion I posted in a different thread on Monday.
Copy the following text into Script Editor / AppleScript Editor (use
Spotlight to find the application):
tell application "Microsoft Word"
activate
tell active window
set width to 1020
set height to 770
end tell
set view type of view of active window to page view
set percentage of zoom of view of active window to 150
end tell
You can now customise this script to your heart's content; change the width
and height of the document (in pixels), change the zoom, or even change the
view. Save the AppleScript, then put it in ~/Documents/Microsoft User
Data/Word Script Menu Items (where "~" stands for your user account). The
script is now available in Word's script menu (the tiny black scroll in the
menu bar). When you select the script, Word will automatically change the
current document to match your settings.
Optional, but insanely useful: when naming your AppleScript, add "\c"
(without the quotation marks), followed by any letter. If you open a
document in Word and hit Ctrl (that's what the "\c" is for) plus the letter
you have just added to the name, the script will be triggered via this
keyboard shortcut. That's precisely what I have done, and now, I only need
to hit Ctrl+n to make Word resize the current document.
On 05/12/09 20:17, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
Michel Bintener
Microsoft MVP - Macintosh
*** Please always reply to the newsgroup. ***
On 05/12/09 22:38, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
> MIchael,
> never used script editor.
> After you copy it it, is there some master template somewhere I tweak?
--
No, on my system they all open at 200%. You may need to blow away your Word
preferences and do it again.
Note that you need to "set" both window size and zoom level, then make a
change to the text (add and remove a space) then save, then quite Word.
No other documents can be open when you edit the Normal template, otherwise
the settings you had when you opened the other documents will remain in
memory and overwrite when you quit.
But I would not bother fiddling around with this: use Michel's AppleScript
:-) I use VBA to do this, but in Word 2008 you have to use AppleScript.
Cheers
On 6/12/09 8:38 AM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
you need to read my entire post and follow *all* the instructions. If you do
not actually run the script, the window won't be resized.
On 06/12/09 19:13, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
Sorry, you're right. If you're on Word 2004, then you don't have a
Normal.dotm, you have a file simply called "Normal" and it does indeed
reside in your Mud folder.
And, because you have Word 2004, you can use VBA which is much simpler than
AppleScript.
The following macro will set the Word window height to 100 % and the zoom to
125%:
Option Explicit
Sub AutoExec()
Call SetWindowSize
End Sub
Sub AutoOpen()
Call SetWindowSize
End Sub
Sub AutoNew()
Call SetWindowSize
End Sub
Sub SetWindowSize()
'
' SetWindowSize Macro
'
'
Dim aDoc As Document
Dim aWindow As Window
Set aDoc = ActiveDocument
Set aWindow = aDoc.ActiveWindow
With aWindow
.WindowState = wdWindowStateNormal
.Top = 5
.Left = 5
.Height = (Application.UsableHeight * 1)
.Width = (Application.UsableWidth * 0.5)
.View.Zoom.Percentage = 125
End With
End Sub
Just
1) paste the whole thing into TextEdit, then
2) convert it to plain text, then
3) paste it into a new module in the Visual Basic Editor.
You must go to TextEdit first because in your browser the spaces will be
converted to non-breaking spaces, and due to a bug in VBA, it will refuse to
compile.
Read the following instructions carefully:
http://word.mvps.org/Mac/InstallMacro.html
This macro is coded so that it runs automatically whenever Word starts,
opens a document, or creates a document. That's something you can't do in
AppleScript: with AppleScript, you must manually "run" the AppleScript. If
you code VBA correctly, it will run automatically when it is needed.
From now, you will never have to set a window size or a zoom ratio :-)
Now: You can adjust the code to your exact tastes. All the action takes
place in the "With... End With" block.
The line beginning ".Height" is asking your computer how high your screen
is, and setting the window to that height. If you do not want Word to be
the full height of the screen, specify a number smaller than "1" after the
asterisk in that line. For example:
.Height = (Application.UsableHeight * 0.95) will make the window 95 % of
your monitor height.
Similarly, the .Width line does exactly the same thing with the width. I
set mine to "half" (which is 0.5) because I have a wide-screen monitor and I
want to be able to do other things as well as work in Word. Tweak that
number until it makes you happy.
Finally, the line .View.Zoom.Percentage = 125
Sets the size of the text as a percentage of what Word thinks your font
height is. (The font heights in Mac Word are totally nonsense: the
mechanism still assumes the screen is set to 72 dpi, which no modern screen
ever is...). On my monitor, 125% is about right: your monitor is bigger, so
you may want to go a little higher.
While you are tweaking, you need to save the macro, then re-open a document
each time, to see the effect.
Cheers
On 7/12/09 5:12 AM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
Wrong! Kev, please read the post I sent you. All of it :-)
And yes, you can adjust the macro I sent you to move the Word window
wherever you like.
Cheers
On 7/12/09 3:23 PM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
Yes: my macro operates whenever Word opens ANY file. It resizes them ALL to
whatever percentage you type where I showed you in the code.
Cheers
On 10/12/09 5:57 PM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
Just CLOSE the Macro Editor by clicking the blue W in the top left corner.
Then, if you like, close and re-open Word to make sure things have saved.
But there's no need to do anything else, really, provided you pasted the
whole thing.
I actually sent you FOUR macros: you need all four. The first three are
simply "Auto Run" macros. Their names are special: any time Word opens a
document it looks for a macro named AutoOpen() and runs it if it finds it.
Same AutoExec, which runs when Word starts, and AutoNew runs whenever you
create a new document within Word.
Each of those macros simply calls the fourth macro, which does the work.
You cannot change any of these names.
There are some other things you have to watch for:
* You must paste these macros into your Normal Template (and it must be the
Normal Template that Word is using, if you have more than one). If you
followed the method I suggested, it's actually rather difficult to do
anything other than get that right.
* There must not be any OTHER macros with names beginning with "Auto..." in
that Template. If there are, only the first one in the template will run.
* If the system is running slow, we sometimes need to insert a timer into
those macros to give the document time to open, otherwise the macro runs
before the document has arrived and it therefore doesn't work.
Let me know if it's not working for you and I'll help you debug it. I have
been using this since about 1997, and it's very reliable once you get it
right, and saves a hell of a lot of time.
Cheers
On 11/12/09 1:35 PM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
Just close the VBA Editor and it's probably working already... :-)
Cheers
On 12/12/09 2:21 PM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
You actually have to read this stuff you know :-) You have two threads
going in two different newsgroups. I sent you the whole thing, then I sent
you a replacement for one of the four macros.
Here it is again: This time, delete everything you have in your Normal
Template, and then paste this in, in its place:
Option Explicit
Sub AutoOpen()
Call SetWindowSize
End Sub
Sub AutoNew()
Call SetWindowSize
End Sub
Sub SetWindowSize()
'
' SetWindowSize Macro
'
'
Dim aDoc As Document
Dim aWindow As Window
Set aDoc = ActiveDocument
Set aWindow = aDoc.ActiveWindow
With aWindow
.WindowState = wdWindowStateNormal
.Height = (Application.UsableHeight * 1)
.Width = (Application.UsableWidth * 0.5)
.Left = ((Application.UsableWidth - .Width) / 2)
.View.Zoom.Percentage = 125
End With
End Sub
Remember you have to paste into TextEdit first, and "Make Plain Text". Then
copy from TextEdit and paste into the VBA Editor.
Note: I have condensed this: there are now THREE macros, not four. Each
line beginning with "Sub" marks the beginning of a macro (a "subroutine").
Each line that contains only "End Sub" marks the end of a macro.
When you paste this in, if any parts turn red, tell me what they are: that's
a compile error and it won't run if that happens.
Cheers
On 12/12/09 3:53 PM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
On 13/12/09 3:16 AM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--
This is a structure of macros that call each other by name. If you change
the name of the macro, it cannot work.
There are three macros I sent in the bundle. They need to be pasted as a
single piece of text.
You must not change any of the names.
The names are hard-coded in the top line of each macro.
Try this:
1) Hit Option + F11 to open the VBA Editor. When it opens, you should see
a three-pane view. The top left pane should be named "Projects". That
lists all of the templates and documents that are open.
2) The Normal project (which is the Normal Template) should be expanded. If
it isn't, click the grey disclosure triangle to the left of the name to drop
it down.
There will be a project below named "Project (Document 1)". That's the open
document: stay out of there. We never put macros in there.
3) Chances are in your template you have only one module, and it is
probably named "NewMacros". I can't tell: you could have changed this, but
you probably haven't. If you cannot see any modules listed, drop down the
disclosure triangle on "Modules" so you can.
4) If it is called NewMacros, double-click it to open it. A pane will
appear to the right headed "Normal � NewMacros (Code)."
See the screen shot here:
http://public.jgmcghie.fastmail.com.au/VBA%20Editor
Now, you can see the three macros in the screen shot? They are named "Sub
AutoOpen()", "Sub AutoNew()" and "Sub SetWindowSize".
Paste the text I sent so that it looks exactly like the screen shot.
Make sure you have no other macros named "AutoOpen", "AutoNew", or
"SetWindowSize". (If you have, you will get a warning about "Multiple names
in the same context" when you try to compile.)
If any lines turn RED, there is a problem with your pasting. You may have
forgotten to "Make Plain Text". Tell me which ones they are, if that is the
case, and I will help you fix them.
Let's check if everything is OK: On the Debug menu, choose the "Compile
Normal" entry. If all is going well, it should appear as if nothing
happened. If there are any errors anywhere in your Normal Template VBA, the
first error found will be highlighted in yellow, and a message will appear
telling you what is wrong.
Assuming no errors, close the VBA Editor by clicking the blue W you see at
the top left of the screenshot.
That's all you have to do: it's working now :-)
It would be good if you were to stop telling yourself that this is
"Difficult" or "Dangerous". It isn't. But you do have to avoid the
temptation to make "little improvements" along the way.
Somehow, you wound up trying to do this from the Macros dialog, not the VBA
Editor. Not a good place to start: it makes things very difficult :-)
And now you know that you cannot change names in a "set" of macros. You
also know that you cannot change the names of the "Auto..." series macros at
all: or they won't work.
Hope this helps
On 13/12/09 3:20 AM, in article 59bae...@webcrossing.JaKIaxP2ac0,
"kev...@officeformac.com" <kev...@officeformac.com> wrote:
--