Katarina said:
Hi Elliott,
ahhh, you have to translate for me as I am not much of a computer
person. What does your macro do? Is it a substitute for a repaginate
command?
Only by accident. It hops into page view and sets the view to occupy
the whole width of the window. Once there, Word will repaginate.
The advantage compared to setting page view via the menu is that you
may assign a keystroke to it. I recorded it because I like to flick
into page view to see what things *really* look like, and back out
again when I get too irritated waiting for Word to catch up. Page width
is nice because you can make the type grow or shrink depending on what
you are examining.
If so, tell me exactly how to enter it into my computer as I have
never created a macro before and will be lost without explicit
instructions.
OK, copy the macro out of the post. In Word, choose
Tools->macro->macros..
alongside 'Macros in', choose Normal (Global Template)
choose edit
scroll down to the bottom of all your macros (there may be none) and
paste my macro text you cut from your newsreader.
The macro name at the top will change to pageWidth. Close the window.
Choose view ->word document to dismiss the macro editing stuff.
Now assign a key combination to it:-
Tools->customize...->keyboard
in the categories box select macros. The right hand box will show all
your macros. Select pageWidth. Select the box labelled press new
shortcut key, and type the combination of keys you want to invoke it
with. I used ctrl-opt-w (believe me, I found it easy to remember) Use
anything you like as long as you don't over-write any other that you
want to keep using.
Hit assign, and you are done. close all the customize boxes and check
the macro works when you press the key combo. If all is OK, say yes
when you next quit Word and it asks if you want to save your normal
template.
This is a goofy way to write macros, but it works for nicking 'em off
usenet. You might want to practice by recording your own, and then
graduate to using all the rest of the macro editing and testing tools.
Then you can come back here and answer my questions ;-)
Here it is again ready for copying:-
Sub pageWidth()
'
' pageWidth Macro
' Macro recorded 05-01-2004 by Elliott Roper
'
If ActiveWindow.View.SplitSpecial = wdPaneNone Then
ActiveWindow.ActivePane.View.Type = wdPageView
Else
ActiveWindow.View.Type = wdPageView
End If
ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitBestFit
End Sub