Word 2008 - keeping things straight in templates

M

mdh

What's the proper way to keep things straight in templates?
For example, I create a new document and set up a new set of body text
styles, disconnect the heading styles from normal, put in some basic
document elements that I need (header/footer, revision history table,
etc.), and set up a toolbar palette with my major styles. I save
this as a template. (is there a significant difference between
a .dotx and a .dotxm file?)

I use this template to start a new document and start working on my
document. Now, if I decide to add autotext, add/modify a style, or
edit a toolbar, what is the appropriate way to do this? I've had a
recent spat of crashes and unpredictable behaviors, so I must be off
the beaten path, although I'm sure I saw at least a few footprints ;-)

It seems that all autotext is going into the normal template when
created, without any option to place it anywhere else. I can copy it
over to my custom template using the organizer (although I had one
application freeze when I did that -- is there some necessary voodoo
for opening/closing template files to do this reliably?)

The "Customize Toolbars and Menus..." dialog has an option at the
bottom "Save in [popup menu with templates]". It wasn't clear to me
how this is used. Aren't individual toolbars retained in individual
templates? I.e., I have a custom editing toolbar that is in the
normal template. My style palette is in my custom template. At what
point does this "Save in..." option grab my toolbar edits and cause
some change to the template files?

Oh, and what is the meaning of the default "Command Name" when
autotext is placed into a toolbar? It is something like "&Apply
Autotext Name".

And is there a recommended behavior for saving out the changes to a
template after modifications. I do seem to get semi-regular crashes
in word, and the templates don't always have the changes saved.

Thanks!
Matt
 
J

John McGhie

Hi Matt:

OK, let's take them one-by-one...

(is there a significant difference between a .dotx and a .dotxm file?

Yes. A dotx or a .docx can contain only styles and formatting. A .dotm or
a docm can also contain active content (macro code). Normal.dotm is a
macro-enabled template. The next version of Mac Office will reinstate VBA
and any macros that remain in your Normal template from Word 2004 will burst
back into life :)
Now, if I decide to add autotext, add/modify a style, or
edit a toolbar, what is the appropriate way to do this? I've had a
recent spat of crashes and unpredictable behaviors, so I must be off
the beaten path, although I'm sure I saw at least a few footprints ;-)

You need to become aware of, and control, your "Customisation Context" when
you store the object, and when you customise your toolbars and keystrokes.

A document can have up to four "levels" of customisation context. Word
looks "outwards" from the document and takes the first object it finds of
the correct name, then stops looking.

This operates completely behinds the scenes and most users are unaware of
it: but when you start using the power features you need to become aware of
it and how to manage your customisation context. The hierarchy is:

1) The active document

2) The attached template

3) The Normal template

4) A global add-in

5) The Word application.

When you enter the AutoText function via the path Insert>AutoText>AutoText,
you are prompted to "Look in" a selection of templates that are currently
active. This is where you set the Customisation Context.

Unless you have created and attached other templates, only the Normal
template and Document Elements.dotx are active. Unless you open the "Look
In" drop-down, Word will leave it set at "All active templates" and save in
the "closest context" according to the above hierarchy.

Unless you either leave it alone or get it exactly correct, you will indeed
live in "interesting times", complete with crashes, freezes, and data loss
:)

Consider that you saved AutoText "Foo" in the attached template. Then when
you used Customise Toolbars, you forgot to change the "Save In" box, so you
saved the keystroke in Normal.dotm.

Then you close that document, and open a different document attached to a
different template. At that stage, you decide to update the AutoText, so
you make a change and save but again you forget to change the "Save In" so
the Customisation Context is still set to Normal.dotm. But you decide to
install a toolbar button for the new AutoText.

You do realise you need to change the Customisation Context this time,
because you want to put the button on your document's special toolbar, but
that won't be available unless you choose the correct template.

Then you close that document and open a third. When you hit the keystroke,
which copy of the AutoText will you get? The answer depends on which
templates are open and active at the time. If Word thinks the object is in
Template A, but it's not, but there is one of the same name in Normal, but
the keystroke is in Template B, you are stretching the friendship a bit and
crashes are likely.

You need to think carefully about which templates will be in play when you
use your resource, and if you change your customisation context, you must be
exactly consistent with it to ensure that all of your objects land in the
correct place.

A couple of hints:
1) These days, I store everything in Normal.dotm. If you work carefully
and accurately, Normal tends not to blow up these days. Anything you put
into Normal is automatically available everywhere in every document you
open.

2) Keep backups of Normal.dotm. My Normal has the collected results of
twenty years' worth of customisations in it: which represents hundreds of
thousands of dollars of billable time. Don't lose it :)

3) Stay out of Document Elements.dotx. The mechanism to work with the
resources in that are not available in Word 2008. You can customise it
using Word 2007. But Mac Word can't handle many of the artefacts that Word
2007 can create. Unless you know EXACTLY what you are doing, you will
corrupt the file. If you do, Word will crash on startup, and it will not
automatically re-create Document Elements.dotx if you delete it. Maybe next
version...
It seems that all autotext is going into the normal template when
created, without any option to place it anywhere else.

If you use the Insert>AutoText>New... Path, Word uses the currently set
Customisation Context. You will not be offered the option to change it.
The Customisation Context persists until the application quits.
I can copy it
over to my custom template using the organizer (although I had one
application freeze when I did that -- is there some necessary voodoo
for opening/closing template files to do this reliably?)

Yes. Don't try to copy "built-in" resources. Don't attempt to overwrite
resources, delete then re-save. And SAVE after each copy. You will then
get away with it most of the time.

This is a "Professional Developers" section of the Word application. We are
expected to "know" what we're doing in here, and there's very little
hand-holding. Sadly, none of this is documented in Mac Word, so the only
way to learn it is to crash an burn lots... The Word 2003 Help is online,
and is very complete and very reliable for Word 2008. The Word 2007 help is
also online, but it's more "kiddie-fluffy" with lots of pretty pictures and
much of the important information left out. {Sigh}
The "Customize Toolbars and Menus..." dialog has an option at the
bottom "Save in [popup menu with templates]". It wasn't clear to me
how this is used.

That is one of three or four places in the Word interface that you can set
the Customisation Context for the current Word session.
Aren't individual toolbars retained in individual
templates?

Yes. But there can be a copy of the same-named toolbar in all of them. If
those toolbars have differences, Word will attempt to resolve the
differences as the toolbars become active (i.e. As the document attached to
the template that has the customisation comes into focus). However, if you
have the same toolbar in two templates, and you make different changes to
each copy, and don't save either, then you can expect crashes: you will
probably get them :)

Once set, the Customisation Context remains the way you set it until you
quite Word. If you have copies of Word open in more than one user ID, with
Fast User Switching enabled, ... Good Luck!
I have a custom editing toolbar that is in the
normal template. My style palette is in my custom template. At what
point does this "Save in..." option grab my toolbar edits and cause
some change to the template files?

When you set it, and for every change thereafter until you quit Word. I
tend to keep everything in Normal: it removes a lot of the opportunity to
forget and break things...
Oh, and what is the meaning of the default "Command Name" when
autotext is placed into a toolbar? It is something like "&Apply
Autotext Name".

Place the Ampersand before the character that will become the keystroke for
that menu item after you open the menu. This doesn't work very well on the
Mac: the letter you assign needs to be unique, and Mac OS has stolen most of
the handy keystrokes :)
And is there a recommended behavior for saving out the changes to a
template after modifications. I do seem to get semi-regular crashes
in word, and the templates don't always have the changes saved.

Yes: If you're going to get stuck in, open the template as a document and
make sure no other documents are open in Word while you make your changes.
Then save the template and re-start Word to ensure that you clear the old
version from memory.

If you are working with only a single document with a single attached
template, make sure it's the only document open while you are customising.
If you lose track of what has saved and what hasn't, Quit Word. That will
write out all the pending saves and close the Temporary Files so you won't
get so many surprises.

I repeat my warning from above: when you are customising, be aware that you
are working with the Developer's toolkit. It's not as stable or robust as
the ordinary user parts of the application. Work slowly, carefully, and
precisely.

Hope this helps

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 
M

mdh

John,
thanks for the unabridged reply. It is really helpful to get a
sense for the program's view of the world. Word really is a strange
creature--seemingly arbitrary without this insight.

Matt
 

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