normal template not working

B

brinded

From what I can gather from previous posts on the subject, there's a
problem with my normal template.

Opening a new document usually comes up in 'Normal' view.

I say usually because that's not always the case. It seems to be
random.

Anyway, I prefer to work in 'Online Layout' view, at 140% zoom.

I've opened the Normal file that's located: Applications/Microsoft
Office X/Templates/Normal and that opens in the settings that I like.
(Interestingly it shows last modified 10/2/06, although I must have
opened at least one hundred new documents since then).

How do I get it so that I can always open a new doc with my favoured
view and zoom?

(Microsoft Word X for Mac service release 1)
(Mac OS X 10.4.8)
 
B

brinded

I just restarted Word. I opened the 'normal' document from the template
folder. It came up in 'normal' view. I changed view to 'online layout',
I typed the word 'test', saved, quit.
Then I re-launched Word. A new default document opened with the word
'test' already typed, but in 'normal' view.
So it looks like I've got the correct deafult document, it's just not
saving view or zoom settings.
Is there an update that fixes this?

thanks, dg
 
B

brinded

Daiya,

Thanks for the reply. I checked the URL and it looks like I'm current
with 10.1.8

I prefer online layout because (for my purposes) it looks identical to
page layout, but without the page breaks. I'm just writing text, really
basic font, not much formatting, double spaced - so it helps to not
have page breaks when going through several thousand words.

best, dg
 
J

John McGhie [MVP - Word and Word Macintosh]

If you want to force this to happen all of the time, record a macro while
you correct the view to what you want.

Then name the macro AutoOpen() and save it in your Normal template.

Make a copy of the macro and name it AutoNew() and save that in the same
place. Like this:

Sub AutoOpen()
'
' Macro1 Macro
' Macro recorded 15/11/06 by John McGhie
'
ActiveWindow.View.Type = wdOnlineView
End Sub

Sub AutoNew()
'
' Macro1 Macro
' Macro recorded 15/11/06 by John McGhie
'
ActiveWindow.View.Type = wdOnlineView
End Sub

Cheers

Daiya,

Thanks for the reply. I checked the URL and it looks like I'm current
with 10.1.8

I prefer online layout because (for my purposes) it looks identical to
page layout, but without the page breaks. I'm just writing text, really
basic font, not much formatting, double spaced - so it helps to not
have page breaks when going through several thousand words.

best, dg

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
B

brinded

Daiya,

I checked (as you suggested), and your guess is correct: 'page layout'
view is saved in template, 'online layout' is not - in fact 'online
layout' when closed will result in 'normal' view upon next launch. Not
sure if this is by design or error. (Either way, I'm guessing it's not
a priority fix!)

John,

Thanks. I'll try the macro.

dg
 
B

brinded

John,

I created both macros - and they work if I select 'macro' then 'run.'
But isn't the idea that they should run automatically on launch?

thanks, dg
 
B

brinded

following copied and pasted from my macros:

Sub AutoOpen()
'
' Macro1 Macro
' Macro recorded 11/21/06 by David Gleeson
'
ActiveWindow.View.Type = wdOnlineView
ActiveWindow.ActivePane.View.Zoom.Percentage = 140
End Sub
Sub AutoNew()
'
' Macro1 Macro
' Macro recorded 11/21/06 by David Gleeson
'
ActiveWindow.View.Type = wdOnlineView
ActiveWindow.ActivePane.View.Zoom.Percentage = 140
End Sub

dg
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Doug:

"On launch..." is the key. There are four "Auto-" series macro reserved
names.

The name "AutoOpen" runs whenever a document is opened.

The name "AutoNew" runs whenever a document is created.

If you want one that runs when Word is launched, you need to copy one and
name one "AutoExec()". That one runs when Word "executes" (i.e. Starts up).

For completeness: "AutoClose" happens when a document closes. "AutoExit"
happens when Word quits.

For a macro to "auto run" it MUST be named with the names I gave you, and it
MUST be in the "closest" template to the document, and it MUST be the only
macro so-named in that template. All three things must be true :)

Now, since you are getting so good at this, we should perhaps look into the
future when your automatic macros will become quite complex. At that stage,
you won't want to have to maintain four or five copies of the same code.

So you would take ONE copy of the code and name it as a "Function". Have a
look at the VBA help topics "Writing a Function Procedure" and "Calling Sub
and Function Procedures"

So edit "Sub AutoOpen()" to be "Private Function DougSetInitialView()"

Note: It is important to avoid naming conflicts when working with
Functions. That's why I added your name to the name. It doesn't matter how
long the name is: Word will turn it into a single integer when it compiles
the code. But weird things will happen if you get an undetected naming
conflict.

Then write a Sub like this:

Sub AutoOpen()
SetView
End Sub

Do that for the other four as well. That makes each of the Auto- macros
call the same function, so you only have to maintain one copy of the active
code.

I do this, because my AutoOpen macro is quite complex: a couple of
screenfuls of code, because it tests for and sets two private toolbars,
hides a couple of toolbars, disables a couple of toolbars that piss me off,
sets up a couple of styles, tests for and associates a couple of numbered
lists with the correct styles... It's be "growing" for the past ten years
:)

In your instance, it is really not necessary because currently your macros
simply contain a single statement. But if you or anyone else comes to
maintain your code in years to come, they can see at a glance that all four
of them call the same function, instead of having to trace the code four
times to discover that all four do exactly the same thing.

Maintainability is well ahead of godliness if the person who gets to do the
maintenance is YOU :)

Cheers

John,

I created both macros - and they work if I select 'macro' then 'run.'
But isn't the idea that they should run automatically on launch?

thanks, dg

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
D

Daiya Mitchell

Mix of design and error, I would guess. HTML files will open in Online
Layout by default regardless--I'm guessing the programmers figured no one
would want Online Layout as the default for non-.htm files, so they probably
actually deliberately made Normal not pick it up. I mean, I'd be really
annoyed if I made a single webpage in Word and then the next regular doc I
created came up in Online Layout because of that.

Your rationale for online layout makes a lot of sense, hadn't thought of
that.
 
P

Paul Berkowitz

"On launch..." is the key. There are four "Auto-" series macro reserved
names.

I have this vague recollection that only AutoOpen() works in Mac Word. But I
haven't checked recently and might be wrong. (Or maybe it was only true for
an earlier version.) So for AutoNew() you put an AutoOpen() in Normal - that
will do the same thing. For AutoExec() you put an AutoOpen() in a template
stored in Startup/Word folder - that does the same thing. Or in Normal
(since a new blank doc based on normal opens when Word is launched.) If I'n
right, you wouldn't be able to simulate AutoClose or AutoExit.

I'll test later, if someone else doesn't do so first.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
J

John McGhie [MVP - Word and Word Macintosh]

Paul:

Oh, GOOD question... OK, I tested it (since I have all five set up).

In Word 2004 Update 11.3 under OS 10.3.9 (shaddap Paul...) all five of the
Auto-series MACROS work.

Sub AutoExec()
MsgBox "AutoExec"
End Sub

Sub AutoOpen()
MsgBox "AutoOpen"
End Sub

Sub AutoNew()
MsgBox "AutoNew"
End Sub

Sub AutoClose()
MsgBox "AutoClose"
End Sub

Sub AutoExit()
MsgBox "AutoExit"
End Sub

Note: The Macros are different from the document EVENTS. I think Paul is
correct, some or all of the EVENTS don't work correctly.

However, there's a couple of "Extras" that shouldn't occur.

1) On Word start-up, AutoExec will run, followed immediately by AutoOpen.

2) On double-clicking a document in the Finder, if Word was not running,
AutoExec will run followed by AutoOpen.

3) On creating a new document, AutoNew will run.

4) On Closing a document, AutoClose will run.

5) On Quitting Word, if there is a document open, AutoClose will run
followed by AutoExit.

This is "correct" but I think it's different from the PC where only one of
the Auto macros should run at startup or Exit. I don't have the PC running
at the moment, someone will have to test that.

When you're testing, do it with small documents: the macro may fail if the
document has not fully loaded by the time it compiles.

Someone will also need to test under OS 10.4 on a MacIntel -- some
variations may occur in Rosetta.

Cheers

I have this vague recollection that only AutoOpen() works in Mac Word. But I
haven't checked recently and might be wrong. (Or maybe it was only true for
an earlier version.) So for AutoNew() you put an AutoOpen() in Normal - that
will do the same thing. For AutoExec() you put an AutoOpen() in a template
stored in Startup/Word folder - that does the same thing. Or in Normal
(since a new blank doc based on normal opens when Word is launched.) If I'n
right, you wouldn't be able to simulate AutoClose or AutoExit.

I'll test later, if someone else doesn't do so first.

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 

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