Using .doc as template leads to .dot save prompt

R

rafraf

Hi,

I offer end-users multiple Word 2K templates as .doc files which all
link to one .dot file. This is done so that I only need to manage one
template, while having any number of virtual templates that dictate
headings and structure.

The end-users creates new documents from the .doc files. They do this
either through a shortcut or through the File>New... dialog.

I am getting a strange phenomenon where creating a new doc out of a
doc, means that I always get a prompt to save the template.

The shortcut looks like this:
"C:\Program Files\Microsoft Office\Office\WINWORD.EXE" /t"C:\some
path\SomeDoc.doc"

once I create a new doc this way, even if I close it, without saving
it, and without making ANY modifications to it, I get prompted to save
the template. I have one autonew macro, but even when disabled this
happens, doing the same from the File>New... dialog does not replicate
this problem.

Thanks all.
 
C

Charles Kenyon

Somehow, you are making changes to the template, probably through code. Any
code changes to the user interface, autotext or styles, could be bringing
out this prompt.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
R

rafraf

Thanks for your reply. I have all of these - but what is strange is
that this problem ONLY occurs when I create a new doc out of a doc
using a shortcut, not if I use the File>New.. dialog, not when I just
create a doc based on the dot....
 
C

Charles Kenyon

When you use the shortcut, you are probably opening the document. If the
document is actually a template with the extension changed, you would get
the behavior you are describing, Word attempting to save as a template.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
R

rafraf

Thanks, again :). That is not the case. The doc is a doc, it is linked
to another template.

So what happens is that when I create a new document based on the
template it has the content of the doc, but it linked to the .dot. No
dot is created nor is anything being saved to it, like I said just
creating a new doc, based on the doc, leads to the prompt to save
changes to the *template*. The same template that in any other context,
when I create a new doc directly based on it, when I create a new doc
based on the doc using the File>New... dialog, etc, does not prompt for
changes.
 
R

rafraf

Sorry for spamming, just think I should clarify some more, about what I
am actually doing and why:

I have a template (.dot), I create a doc based on the template. In the
doc I write in the standard headers and sections for the particular
"template". So, for example, if it is a design doc, it might have
headings such as syntax, database modification, tw modifications, etc.
If it is a minute template, it might have headings such as attendees,
outcomes... both docs however refer to the same .dot file.

I then place the .doc's in the user's workgroup template directory and
make the .dot hidden so that it is not selectable. A user the creates
new documents based on doc files, but the new docs always have the
(hidden) .dot as their template.

As a result, I can have any number of templates while only having to
maintain one .dot file.

Works like a charm: except when I open the doc as a template. When I do
this, I am not prompted to save the doc as a dot, I am prompted to save
*changes* to the dot, which is down stream.

Again, thanks Charles, I hope this clarifies things rather than
complicate them.
 
C

Charles Kenyon

You are being very creative! I've never seen or heard of such an
implementation. I'm going to try it out; still not sure what advantages you
are getting from it. What does the template contain that you could not keep
in a global template?
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
M

Margaret Aldis

Hi

I've used docs as "templates" in exactly this way, without getting the save
changes to template (.dot) prompt, so I don't think it is this structure
that is at fault.

I would look at what macros are running when you create your new documents.
There are various commands that make the attached .dot "dirty" - I seem to
remember reading attached template properties (for instance, to compare a
recorded version number) causes problems.
 
M

Margaret Aldis

Me too Charles - this is one of my tricks :)

Using an attached template instead of a Global makes sense if you have
context-dependent toolbars and macros - i.e. stuff that only applies to some
types of document the user might be working on. However, that's not
necessarily separate functionality for every different content model, so
using this method to "group" templates does answer a need. (Plus of course
it simplifies installation if you don't need to search out the startup
folder.)

It's good to be able to make as many of these .doc "templates" (a.k.a
"model documents") as you need without proliferating .dots because it keeps
all letters (say) attached to the same company letter template rather than
to dozens of different stock letter templates. In the past I've had to
implement an automatic format update which did a version compare against the
template (i.e. does this document match the latest template release number)
and where necessary updated styles and replaced headers/footers/covers with
new ones from AutoText. That was fairly simple with just a few corporate
..dots to worry about, but if we'd had huge numbers of independent templates
it would have been a nightmare.

I also think it's a particularly appropriate method for users who want to
make their own model documents as specializations of corporate document
types. They can simply place a shortcut to these personal/departmental
folders of stock letters or whatever into the templates folder - that way
they are visible as a separate tab and operate as templates, but can be kept
in the user's normal document folder structure, distinct from the
centrally-issued base templates. Much safer to do this to reuse content than
to open old documents and "Save As" and maybe accidentally "Save Over" ;-)
 
C

Charles Kenyon

Thank you for the explanation. I do something similar except with templates.
I have a primary and derivative templates, all of which share a document
variable which is the primary template's name. When a new document is
created, it checks the attached template name against the variable and if it
is different, it goes to the primary template for updated information
(headers / footers / styles). It can also attach to the primary template
when done to pick up any changes to toolbars. This method of documents
instead of templates may work better, I'll have to give it some thought.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
S

Suzanne S. Barnhill

Word 2002 and 2003 do facilitate using *any* document as a template via the
"New | From existing document..." option in the New Document task pane (no
danger of failing to Save As this way, as the new document opens as
Document#). But it hadn't occurred to me that you could actually put a .doc
file in a template folder and use it this way.
 
R

rafraf

Preface: This turned out to be rather long, a lot of it explains my
motivation. Really, only the last paragraph addresses my core problem.
Again, thanks everyone for taking the time to reply to this. Still not
too familiar with this newsgroup system, so please excuse me if I don't
quote.

I am using this approach over global for three reasons: 1. a global is
still harder to maintain, 2. I want to minimize the intrution into
people's standard Word settings, and, 3, I want to use the same styles
universally. There is also a historical reason in that I wanted to use
a network folder rather than a script to disseminate the template, but
for various reasons we ended up doing the latter.

Like was said using {dot}->doc->{doc} approach means that anyone that
can use the template can create a template and that any number of
'templates' can be as easily maintained as one (and thanks to these
newsgroups, even headers and footers have been standardized and
centrelized). From an end user's point of view, it is completely
transparent and is no different from having multiple .dots.

The one problem is if you want to have things like a desktop/start menu
shortcut to a particular template. If you just had a shortcut to the
..doc, you will end up opening it rather than creating a new doc based
on it. So, to overcome this, I thought I would create shortcuts with
the instructions to open the doc as new. But this just does not work
well: The [wordexec /t"docpath\docname.doc] form of the shortcut
creates a document# out of the doc, but it is different in crucial ways
from both the context menu [new] (right click .doc file >click 'New')
and the File>New... dialog. The two differences are that my autonew
macro does not get executed (the macro executes a dialog to enter
document and custom document properties) and that I am prompted to save
changes to the template, the latter being the most problematic.


Some of the reasons mentioned here about why I would be told to save
the template are consistant with what I would expect, but I don't
believe any of them address why this problem **only** occurs when the
doc is opened through the [wordexec /t"docpath\docname.doc] shortcut
rather than through any other method available to me. This also may be
symptomatic of bigger problems (i.e. differences) between using the
shortcut and other approaches. I have read through Microsoft KB
articles on Word 2K startup switches, and only /t seems applicable, but
if anyone knows of another way of doing it, I would love to hear about
it.
 
M

Margaret Aldis

Thanks for the extra information - I hadn't taken in the issues with the
shortcut before.

I've just tested this here (Word 2003) with a quickly made sample .doc made
from a template with a complex AutoNew macro and I find I can New from the
document without problems, but the /t flag produces a "cannot read file"
error - so clearly there are indeed "bigger problems" with differences
between New and the /t flag - /t behaviour must be making some assumptions
that it is a template, I suppose.

Looks like the desktop shortcut with startup flags may be a cul de sac. If
separate shortcuts for each template really are essential (as opposed to
other methods like a menu of model documents or a UserForm to choose) then
maybe the only solution would be a matching set of dummy templates/documents
with Auto macros that simply New from the appropriate .doc and close the
dummy document? If you use a naming pattern it should be possible to reduce
maintenance so each dummy is simply a copy of a master with the macro, just
changing the filename?

Just thinking aloud here, maybe someone else will have a better idea or
understanding of the /t problem.

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk



rafraf said:
Preface: This turned out to be rather long, a lot of it explains my
motivation. Really, only the last paragraph addresses my core problem.
Again, thanks everyone for taking the time to reply to this. Still not
too familiar with this newsgroup system, so please excuse me if I don't
quote.

I am using this approach over global for three reasons: 1. a global is
still harder to maintain, 2. I want to minimize the intrution into
people's standard Word settings, and, 3, I want to use the same styles
universally. There is also a historical reason in that I wanted to use
a network folder rather than a script to disseminate the template, but
for various reasons we ended up doing the latter.

Like was said using {dot}->doc->{doc} approach means that anyone that
can use the template can create a template and that any number of
'templates' can be as easily maintained as one (and thanks to these
newsgroups, even headers and footers have been standardized and
centrelized). From an end user's point of view, it is completely
transparent and is no different from having multiple .dots.

The one problem is if you want to have things like a desktop/start menu
shortcut to a particular template. If you just had a shortcut to the
.doc, you will end up opening it rather than creating a new doc based
on it. So, to overcome this, I thought I would create shortcuts with
the instructions to open the doc as new. But this just does not work
well: The [wordexec /t"docpath\docname.doc] form of the shortcut
creates a document# out of the doc, but it is different in crucial ways
from both the context menu [new] (right click .doc file >click 'New')
and the File>New... dialog. The two differences are that my autonew
macro does not get executed (the macro executes a dialog to enter
document and custom document properties) and that I am prompted to save
changes to the template, the latter being the most problematic.


Some of the reasons mentioned here about why I would be told to save
the template are consistant with what I would expect, but I don't
believe any of them address why this problem **only** occurs when the
doc is opened through the [wordexec /t"docpath\docname.doc] shortcut
rather than through any other method available to me. This also may be
symptomatic of bigger problems (i.e. differences) between using the
shortcut and other approaches. I have read through Microsoft KB
articles on Word 2K startup switches, and only /t seems applicable, but
if anyone knows of another way of doing it, I would love to hear about
it.
 
R

rafraf

Thanks Margaret, some great advice. I think, for now, I will leave
direct shotcuts out of the equation, if there is a request for them I
will use an autonew as you suggested or compile a simple executable
that will do what the autonew() macro you are proposing would do.

I would also have hoped to learn more about the start up switches and
how they differ from other ways of opening a doc, but it looks as
though I will have to be content with what there is.

Thanks again to everyone,
Raf.
 
C

Charles Kenyon

A possible solution, although one I suspect requires high maintenance, is to
use a single template, with a UserForm that determines content. Possibly the
content is drawn from AutoText. I think Dave Rado uses this method. This
would not allow desktop shortcuts to different content, though, unless there
were macros for the specific content in the template which could be
triggered by startup switches.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

Margaret Aldis said:
Thanks for the extra information - I hadn't taken in the issues with the
shortcut before.

I've just tested this here (Word 2003) with a quickly made sample .doc
made from a template with a complex AutoNew macro and I find I can New
from the document without problems, but the /t flag produces a "cannot
read file" error - so clearly there are indeed "bigger problems" with
differences between New and the /t flag - /t behaviour must be making some
assumptions that it is a template, I suppose.

Looks like the desktop shortcut with startup flags may be a cul de sac. If
separate shortcuts for each template really are essential (as opposed to
other methods like a menu of model documents or a UserForm to choose) then
maybe the only solution would be a matching set of dummy
templates/documents with Auto macros that simply New from the appropriate
.doc and close the dummy document? If you use a naming pattern it should
be possible to reduce maintenance so each dummy is simply a copy of a
master with the macro, just changing the filename?

Just thinking aloud here, maybe someone else will have a better idea or
understanding of the /t problem.

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk



rafraf said:
Preface: This turned out to be rather long, a lot of it explains my
motivation. Really, only the last paragraph addresses my core problem.
Again, thanks everyone for taking the time to reply to this. Still not
too familiar with this newsgroup system, so please excuse me if I don't
quote.

I am using this approach over global for three reasons: 1. a global is
still harder to maintain, 2. I want to minimize the intrution into
people's standard Word settings, and, 3, I want to use the same styles
universally. There is also a historical reason in that I wanted to use
a network folder rather than a script to disseminate the template, but
for various reasons we ended up doing the latter.

Like was said using {dot}->doc->{doc} approach means that anyone that
can use the template can create a template and that any number of
'templates' can be as easily maintained as one (and thanks to these
newsgroups, even headers and footers have been standardized and
centrelized). From an end user's point of view, it is completely
transparent and is no different from having multiple .dots.

The one problem is if you want to have things like a desktop/start menu
shortcut to a particular template. If you just had a shortcut to the
.doc, you will end up opening it rather than creating a new doc based
on it. So, to overcome this, I thought I would create shortcuts with
the instructions to open the doc as new. But this just does not work
well: The [wordexec /t"docpath\docname.doc] form of the shortcut
creates a document# out of the doc, but it is different in crucial ways
from both the context menu [new] (right click .doc file >click 'New')
and the File>New... dialog. The two differences are that my autonew
macro does not get executed (the macro executes a dialog to enter
document and custom document properties) and that I am prompted to save
changes to the template, the latter being the most problematic.


Some of the reasons mentioned here about why I would be told to save
the template are consistant with what I would expect, but I don't
believe any of them address why this problem **only** occurs when the
doc is opened through the [wordexec /t"docpath\docname.doc] shortcut
rather than through any other method available to me. This also may be
symptomatic of bigger problems (i.e. differences) between using the
shortcut and other approaches. I have read through Microsoft KB
articles on Word 2K startup switches, and only /t seems applicable, but
if anyone knows of another way of doing it, I would love to hear about
it.
 
R

rafraf

Yeah, like you said, the maintenance is the biggest issue here.
Further, it would mean that template authors would have to be very
competent with Word and one of the things I like about this approach is
that, this way, they don't need to be.

Because I have not found anybody advocating this approach
(dot>>doc>>doc), I wanted to make sure that I wasn't missing something
critical. But it sounds as though the problems I am having are to do
with the startup switch and not with the 'doc as template' approach.
This was more important to me than providing desktop shortcuts (which
my colleagues have had in the past).
 
B

Bob S

But... Don't you still need a process to update the DOC-as-template
files whenever you make a change to the underlying template? Unless
you have them set to update automatically, which I thought was bad for
other reasons?

Bob S
 
C

Charles Kenyon

Yes, you do if you are making changes in the styles of the underlying
template. If the changes, though, are to macros, userforms, AutoText, and
custom menus, no special updating is needed.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
R

rafraf

As Charles said, the styles will not update automatically (which is
good, we don't want to catch the end-users off guard, not to mention
all the other problems associated with that). I just have a button that
updates styles and copies out list templates based styles to protect
them. Further, I use a recommendation from here, and create headers and
footers with autotext stored in the master template. This means that
everything is centralized in one file and everything, except for
styles, is dynamic.
 

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