.dot versus .doc files, file format differences?

  • Thread starter Thread starter Kimmo R. M. Hovi
  • Start date Start date
K

Kimmo R. M. Hovi

Are there any big differences in the .dot and .doc file formats, that
would make "rename .dot to .doc and start editing" a bad idea? Or are the
two formats essentially the same with the only exception being the file
extension?
 
A DOT file is a type of document that Word recognises as a template. Word
always knows it is a template no matter what you call it. Why would you want
to rename and start editing? Use it as a template as intended. Put the
template in the user templates folder (tools > options > file locations >
user templates) then create a new document from it.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
There are real (internal) differences in the file structures. Renaming the
extension is a bad idea. You'll get confusing results.
--

Charles Kenyon

See the MVP FAQ: <URL: 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.
 
[ Discussion about the differences removed ]
There are real (internal) differences in the file structures. Renaming the
extension is a bad idea. You'll get confusing results.

*sigh* What, then, would be a proper way to make a .dot in a .doc without
actually opening the file in Word? Preferably something that can be
implemented on Linux?
 
A DOT file is a type of document that Word recognises as a template. Word
always knows it is a template no matter what you call it. Why would you want
to rename and start editing? Use it as a template as intended. Put the

Well, you see the company I work for (Kronodoc) has among other things a
client-server document management system in the product portfolio. What
I'm looking into is one person constantly update a template (As a .dot
file), while allowing others to use that .dot to make .doc files, without
saving the template locally...
 
Kimmo -
Think of .dot as a master template(not to be confused with
master documents). Unless otherwise set, the default save
off a template is a .doc. There is no difference in what
the two can do.
 
Hi Lenny,

This is mistaken. There is a difference between a Word document and a Word
template that extends beyond the filename extension. A template may be a
special form of a document, but you can't change one into the other by just
changing the extension. See other posts in this thread.
--

Charles Kenyon

See the MVP FAQ: <URL: 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.

Kimmo -
Think of .dot as a master template(not to be confused with
master documents). Unless otherwise set, the default save
off a template is a .doc. There is no difference in what
the two can do.
 
I'm not sure I understand what you mean by "make a .dot in a .doc." Do you
mean "make a template from a document?" Normally it is done the other way
around; a template is used to create a document. You can save a document as
a template within Word. This will, by default, save it in the User Templates
folder. That is a good place to save a template, although not the only
place. Then you have the original document (until you delete it) as well as
the new template based on the document.

You can't change a document into a template from outside of Word, nor can
you change it within Word without opening it; or at least I can't. It is
possible someone with extensive knowledge of Word's (proprietary) file
format could do it. Obviously Word does.

In versions before Word 2002, it was impossible to save a template as a
document. In the latest versions it is possible. It is probably still not
advisable.

What is it you are trying to accomplish here? It is possible that it could
be programmed using vba.

My ignorance of Linux is more extensive than my ignorance of most subjects,
and that is going some. I was not even aware that Word runs under Linux.
--

Charles Kenyon

See the MVP FAQ: <URL: 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.

Kimmo R. M. Hovi said:
[ Discussion about the differences removed ]
There are real (internal) differences in the file structures. Renaming the
extension is a bad idea. You'll get confusing results.

*sigh* What, then, would be a proper way to make a .dot in a .doc without
actually opening the file in Word? Preferably something that can be
implemented on Linux?
 
What is it you are trying to accomplish here? It is possible that it could
be programmed using vba.
My ignorance of Linux is more extensive than my ignorance of most subjects,
and that is going some. I was not even aware that Word runs under Linux.

Ok, maybe we're sidetracking here a bit too much. Let me re-explain the
situation:

Kronodoc, my employer, has a self-titled software product used in document
management, process management, project management, and so on. Windows is
not a supported server platform. However as a document management system,
it would be nice to be able to keep file templates in the system.

What I am trying to accomplish is that a user can click a "Create from
template" button, which would copy the .dot (Edited by marketing
department's top AD) into a .doc (Edited by our engineer pressing the
button) to give the user a fresh start.

So far we've established that the two file formats are not identical. What
are the differences? What are the bad things which result from renaming
the document from .dot to .doc without going through the "ms word save"
transformation?

Furthermore, is there software that one can use to automate the transition
from .dot to .doc?
 
The software you need is "Word". The details of the DOC and DOT format
are understood, but far as I know not published. Buy and use a copy of
Word to do this.

You can automate this process from macros inside of Word or using COM
interface from a program external to Word written in PHP, Python, Perl,
VB, etc. While you report your employer's application doesn't reside on
a Windows instance, you could put this Windows instance on another
machine and communicate across the network to build the files you want.
Or, I'd recommend you try at running the Windows instance inside of
Linux and figure out how to drive Word from your Linux program as this
may be of benefit to customers's implementations. (simpler). I suspect
that this last step is possible, but I've not done it. I have and do
run Windows on top of Linux routinely.

Hope this is useful to you. Let us know.

rms
 
The problem is that you will have a file that looks to Windows like a
document and to Word like a template. User problems that result from such
confusion pop up on these newsgroups periodically. The only way I know of to
create a document from a template is to use Word. Perhaps you can pursuade
Microsoft to share their file formats with you.

You can use document files as the basis for a new document in your
application. That is, .doc to .doc. You will lose the ability to use
AutoText doing this and if your base documents contain macros you will run
into macro security. You will also have larger than necessary documents
because the macros will be in every document, not just in the templates. The
same thing will be true of other interface modications that can be in
templates and implemented in documents without being in the documents.

It sounds like you would not be trying to use these features anyway and
would simply be using Word as a text processor. If so, do not use .dot files
at all in your application.
--

Charles Kenyon

See the MVP FAQ: <URL: 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.
 
Let's start over. I've read this entire thread, and while the primary
question has been addressed, I'm not sure the answer is helping with your
situation.

A .dot file in Word is a template. Templates can store some things that
document (.doc) files cannot. For more on this, see
http://word.mvps.org/FAQs/Customization/WhatTemplatesStore.htm.

The only reason for *opening* a template is to edit it. This can be
accomplished in Windows Explorer by right-clicking and selecting Open or in
Word's File Open dialog by navigating to the templates folder and opening
the template just as if it were a document. When the template is open, you
can save it just as you would a document, or you can use Save As to save as
a different template, but you *cannot* save as a document: once a template,
always a template.

The ordinary way of creating a document based on a template is to save the
template in the User Templates folder in Word (the location varies with Word
and Windows version but will always be accurately stated on the File
Locations tab of Tools | Options) and then use File | New to select it. If
you double-click on a .dot file in Windows Explorer, you get the same result
because the default action for .dot files is New rather than Open.

As others have said, if you rename the template from .dot to .doc, you
haven't actually created a document; you've just created a template that
looks to Windows like a document but will still be treated as a template by
Word. This is a dangerous and undesirable situation. To turn a template into
a document or make a document out of a template, you have to double-click
the template either in Windows Explorer or in Word's File New dialog, either
of which will creates a new, unnamed document. The title bar of this
document should say Document#; if it is Template# (Template1 or Template2),
then you have done something wrong and created a new template instead.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Let's start over. I've read this entire thread, and while the primary
question has been addressed, I'm not sure the answer is helping with your
situation.
A .dot file in Word is a template. Templates can store some things that
document (.doc) files cannot. For more on this, see
http://word.mvps.org/FAQs/Customization/WhatTemplatesStore.htm.

Hrm, I still don't get it. So far we've established that the file formats
are different. However, what is unclear to me is exactly how. Also, it is
unclear to me why it is a bad thing to be using a template like a
document? Also, I'm not interested whether or not the .dot gone .doc is or
is not usable as a template if further renamed back to .dot.

The differences we've established so far:
- A .dot has a property that when located in the appropriate folder,
will appear in file -> new -> from template (Not an issue in my case,
as I don't need the resulting file to be usable as a template.)
- If you rename a .dot into a .doc, when you open that in Word and then
save it, it will still be of type Document Template.

And, um, that's it.

Can you give me some real life use case issues where writing your theses
or specification or whatnot as a document template instead of a document
would make a difference?

To clarify even more:

The document template is stored on a web server (Apache and some unix, if
anyone cares. Not windows). It neeeds to be fetchable unedited (I.e. it
needs to act as a "web based network drive" for the AD/Marketing person
editing the template). At the same time, the system needs to be able to
produce an empty office document, using that said template as the basis.
(Yes, it would be nice if there was a common solution for all office
template/file pairs, but Word is by far the most important).

I am also limited in that:
- The users creating the documents from the template can not download the
template, copy it to the appropriate folder, and then go file -> new ->
from template (User requirement, this would not be point'n'click enough)
- The users are not able to mount the templates from the network
- The template editor must not have to save their work as a .dot AND a
.doc, but just .dot

To make a long story short:

_ What is the biggest issue arising from using a .dot renamed to .doc as
a document? _
 
The biggest issue is that a .dot renamed to .doc is *not* a document; it's
still a template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Hrm, I still don't get it. So far we've established that the file formats
are different. However, what is unclear to me is exactly how. Also, it is
unclear to me why it is a bad thing to be using a template like a
document? Also, I'm not interested whether or not the .dot gone .doc is or
is not usable as a template if further renamed back to .dot.
I doubt that anyone here knows the difference in the file formats; they are
proprietary and I believe tightly guarded.

A document can be saved as a template and become a template, but only from
within Word, not just by being renamed. In Word 2002 and 2003 you can save a
template as a document, again only from within Word. This strips the
template of AutoText.
The differences we've established so far:
- A .dot has a property that when located in the appropriate folder,
will appear in file -> new -> from template (Not an issue in my case,
as I don't need the resulting file to be usable as a template.)
- If you rename a .dot into a .doc, when you open that in Word and then
save it, it will still be of type Document Template.

And, um, that's it.
Another difference is that a template, however named, cannot have an
attached template. An attached template can carry user interface
modifications that are not application global. It can also carry styles
which can replace those in the document. One of the primary ways of changing
styles in a document is to attach a different template to the document with
the option checked to update styles.

The big difference is that the entire program is set to recognize and depend
on these differences. The Word help files will give advice to users that
cannot be carried out on misnamed files. Technical support will not spot
this as a source of difficulty unless explicitly told that the files are
deliberately misnamed.

If you do not need the ability of a template to hold macros and AutoText
available to the documents based upon them, use real .doc files as your
"templates." Don't name them .dot files. I would recommend finding a term
other than template to describe them in your system so as to not confuse
your users.

Templates in a workgroup templates folder are available from the network
under File => New. There are also relatively simple means to put specific
templates on dynamically generated menus.

You are welcome to search these newsgroups for problems arising from
templates being named documents and vice versa. I'm not about to do that for
you. I know that I have personally addressed at least four such problems in
the last six months. The problems are rare only because the behavior of
misnaming files is, itself, rare. I'm done on this thread. I wish you luck.
--

Charles Kenyon

See the MVP FAQ: <URL: 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.
 
Back
Top