Word files WITHOUT attached template?

T

Tim

[msg. originally posted in microsoft.public.word.general-- however I can
view that group from OE so reposted here]Say I create a Word doc file on my
local pc with an attached template.
The template it's attached to is also on my local system.

I then email this file to someone but do not send them the template
file that this doc is using.

What exactly happens when the recipient opens this file on their pc?
Does Word "look" for the attached template, and not finding it, pulls
the style information from the doc itself?

If this recipient looks to see what template is attached, the template
name with my (the sender) directory structure is still there.

Obviously it's a good thing that even without the attached template,
Word can preserve the document formatting for that file. However--
unless I'm missing something-- I've always thought this to be an
extremely poor way to deal with this kind of situation.

A much better system would be for Word-- upon detecting that a
template is attached but not present-- simply "warn" you of that
situation and tell you it will be using document level styles. Also,
remind you that any template level customization that might have been
present in this template (shortcuts, auto text, etc.) will not be
available.

Or again, am I missing something?
 
J

Jonathan West

Tim said:
[msg. originally posted in microsoft.public.word.general-- however I can
view that group from OE so reposted here]Say I create a Word doc file on my
local pc with an attached template.
The template it's attached to is also on my local system.

I then email this file to someone but do not send them the template
file that this doc is using.

What exactly happens when the recipient opens this file on their pc?
Does Word "look" for the attached template, and not finding it, pulls
the style information from the doc itself?

Not quite. What happens depends on whether the "Automatically update
document styles" box in the Templates and Addins dialog was checked before
saving the document.

If the box is unchecked, the style information is saved within the document
and continues to be used even if the template is no logner available.

If the box is checked, the styles are automatically updated from the
original template. If the template of that name isn't available in the
location it was in when the file was saved, then Word looks for the template
in various places - the user templates folder, the workgroup templates
folder, the same folder as the document. If all else fails, the styles are
loaded from normal.dot.

If you intend distributing Word documents outside your organisation, then
you do not want to have "Automatically update document styles" checked. If
you have a controlled professional document-making process where the
templates will remain available during the life of the documents as Word
documents, then you might want to have the box checked.
 
T

Tim

Not quite. What happens depends on whether the "Automatically update
document styles" box in the Templates and Addins dialog was checked before
saving the document.

Interesting-- your explanation clears up most of my confusion re. what's
happening. I did not realize that the "Automatically update document styles"
state was preserved at the doc level. Thanks, Jonathan.

IMO, Word's implementation of it's Normal.dot template system is easily the
biggest culprit accounting for unexpected formatting "errors". Particularly
when distributing files to other systems & users.

I suppose I could write an autoexec Macro myself that checked for the
attached template and displayed this to users, but I shouldn't have to. How
hard would it be to MS to add some simple code to check-- optionally even so
you could turn it on/off-- the template status of the doc they're opening
and display these findings along w/ some options.

"WARNING: This document was saved w/ an attached Template that is not
currently present.
1. BROWSE for Template to use?
2. Remove all attached Template information?
3. Ignore this message and take your chances that Word can correctly guess
what you want to do? <g>

What we're trying to set up and enforce is indeed a "controlled professional
document-making process ". But we have a geographically distributed tech
writing group consisting of all levels of users.

So even we start out with a "base document" containing all the styles in
use, by the time this file makes the rounds strange things happen. For
example, large blocks of text from completely different Word sources is
often cut/pated in and by the time it gets back to me I usually quickly give
up and resort to doing a [Cntrl + A] [Cntrl + Q] [Cntrl + SPACEBAR] and
start over. <g>
 
J

Jonathan West

Tim said:
Interesting-- your explanation clears up most of my confusion re. what's
happening. I did not realize that the "Automatically update document styles"
state was preserved at the doc level. Thanks, Jonathan.

IMO, Word's implementation of it's Normal.dot template system is easily the
biggest culprit accounting for unexpected formatting "errors". Particularly
when distributing files to other systems & users.

I suppose I could write an autoexec Macro myself that checked for the
attached template and displayed this to users, but I shouldn't have to. How
hard would it be to MS to add some simple code to check-- optionally even so
you could turn it on/off-- the template status of the doc they're opening
and display these findings along w/ some options.

"WARNING: This document was saved w/ an attached Template that is not
currently present.
1. BROWSE for Template to use?
2. Remove all attached Template information?
3. Ignore this message and take your chances that Word can correctly guess
what you want to do? <g>

That's not how Microsoft designed it. The default setting of for that box to
be unchecked, and therefore for style information to be carried within the
document itself.

What is more, by the time the document is open, if the original template is
not available, Word has already attached normal.dot, since it is not
possible to have a document open without an attached template, and
normal.dot is attached if nothing else is available.

There is one way of finding out what the original attached template was
before you open the document in Word. You can write some code which uses
dsofile.dll to get the template name, and then check to see whether the
template exists. The following article contains links to a Word template
that shows how to use dsofile.dll, and a link to where you can download it
from Microsoft.

Getting access to the Document Properties of a Word file
http://www.mvps.org/word/FAQs/MacrosVBA/DSOFile.htm

But it seems to me that if you are wanting to implement a controlled
process, it is as easy to ensure that the templates are distributed in the
first place as it would be to ensure that template-checking code is
available.

What we're trying to set up and enforce is indeed a "controlled professional
document-making process ". But we have a geographically distributed tech
writing group consisting of all levels of users.

So even we start out with a "base document" containing all the styles in
use, by the time this file makes the rounds strange things happen. For
example, large blocks of text from completely different Word sources is
often cut/pated in and by the time it gets back to me I usually quickly give
up and resort to doing a [Cntrl + A] [Cntrl + Q] [Cntrl + SPACEBAR] and
start over. <g>

Force can't really be used on people for this. Therefore persuasion has to
be used instead :)

What you *can* do is make it easier for people to do things right than to do
them wrong. For this to work requires 3 things.

1. A well-designed template with enough styles to do everything that the
users are likely to want to do in the body of the document.

2. A toolbar with a button for each style, to make it easy to use your
styles.

3. Sufficient training to explain how and why to use the styles.

I assume you already know how to define a template with a functional set of
styles. But in case you don't (or in case others are reading and following
this thread) then these two articles may help you

Creating a Template - The Basics (Part I)
http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart1.htm

Creating a Template (Part II)
http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart2.htm

For creating the styles toolbar, ake a look at this article. If you are
using Word 2003 throughout your organisation, there is some additional
protection you can apply to the template. The article also describes that.

Creating Custom Toolbars for Templates
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=262
 
T

Tim

But it seems to me that if you are wanting to implement a controlled
process, it is as easy to ensure that the templates are distributed in the
first place as it would be to ensure that template-checking code is
available.

Unfortunately one main part of the working project is Microsoft Portal
Server and docs in Portal behave differently. You can't "attach" .dot's in
the usual manner.


Force can't really be used on people for this. Therefore persuasion has to
be used instead :)

What you *can* do is make it easier for people to do things right than to do
them wrong. For this to work requires 3 things.

1. A well-designed template with enough styles to do everything that the
users are likely to want to do in the body of the document.

2. A toolbar with a button for each style, to make it easy to use your
styles.

3. Sufficient training to explain how and why to use the styles.

We're on the same wave length. I've created and documented just about every
style writers will need. Also created custom drop-down menus w/ logical
groups for these styles (headings, bullet levels, numbering levels, etc.).
Also using keystroke equivalents to apply the primary styles.

But given the template situation I resorted to creating all in the "master"
doc I distribute-- rather in an attached template would of course be much
preferable. All of which led me here when some strange things were
happening... <g>
 
J

Jonathan West

Tim said:
Unfortunately one main part of the working project is Microsoft Portal
Server and docs in Portal behave differently. You can't "attach" .dot's in
the usual manner.

I would be interested in anything specific you might be able to tell me
about this. I haven't yet had occasion to experiment with SharePoint Portal
Server, but I expect that it will become much more common over the next year
or two.
to

We're on the same wave length. I've created and documented just about every
style writers will need. Also created custom drop-down menus w/ logical
groups for these styles (headings, bullet levels, numbering levels, etc.).
Also using keystroke equivalents to apply the primary styles.

But given the template situation I resorted to creating all in the "master"
doc I distribute-- rather in an attached template would of course be much
preferable. All of which led me here when some strange things were
happening... <g>

What you might consider is a toolbar button which does a "reset styles"
operation. Effectively what you would do is ensure that the styles are
reloaded into the document from the template by doing the code equivalent of
checking "Automatically update styles", saving the document, uncheckimg and
saving again.

To do this, you change the value of ActiveDocument.UpdateStylesOnOpen to
True and back again to False. If I recall correctly, you need to save in
between to make sure that the style transfer takes properly.
 
T

Tim

Jonathan,
I would be interested in anything specific you might be able to tell me
about this. I haven't yet had occasion to experiment with SharePoint Portal
Server, but I expect that it will become much more common over the next year
or two.

I tend to agree.

I tried to contact you via your multilinker site but got an error?

If you email me I can point you to a couple of resources that might help a
lot. Plus we're hosting both Portal Server and WSS and I might be able to
set up a simple test for you if you like.
 

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