updated question: .doc references .dot in same directory, instead of template directory (not what I

K

Keith R

ok, I've been doing some manual debugging (msgboxes, breakpoints, and all
that) and it looks like one of the reasons I'm having problems is because I
have a copy of my custom template in the same directory as the child
documents I've been creating (even though I've been creating them off the
copy in the template directory).

As a result, when I open the .doc child documents, they automatically
reference the .dot in the same folder, instead of the one I put in the
template directory, which is causing all sorts of problems for me.

Is there a way to "force" .doc child documents to _first_ look to see if
the parent .dot is available in the template directory, _before_ using a
local .dot file with the same name?

I want to handle this in code, because my end users might also put their
..doc files in the same directory (or on the same floopy disk) as the
template I distribute, and I don't want them to run into these problems...

Many thanks!!
Keith R

One alternative, I suppose, is when my VBA copies the .dot into the
template directory, I could do it with a "save-as", and use a different
name, thereby keeping the .doc files from using the .dot template in the
same directory?
 
D

Doug Robbins - Word MVP

Hi Keith,

It would help if you provided some information on how the "child" documents
are being created. I would think that if you use

Documents.Add Template: = "[Drive]:/[Path]/[TemplateName.dot]"

You would not have a problem.

AND you should advise your users NOT TO WORD ON DOCUMENTS FROM A FLOPPY
DISK.

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP
 
K

Keith R

The template makes a copy of itself in the template directory and then
closes. Users create child documents using File/New or
Start/Office/[MyTool.dot].

The problem I ran into (that my users may also) is that I keep all my files
for this project in one folder. I put the original copy of the template in
that folder (as a backup in case I ever needed it again), and the template
copied itself to the template directory from that local folder (after which
the copy in the local folder should no longer be relevant). I create a new
child document from within Word (file/new) and save it with a new name in
that same user folder. The problem is that when I re-open the child
document, it decides that the .dot in the same folder is the one it is
linked to (instead of the one in the template directory) which caused all
my problems.

I did test my alternate solution, which was to rename the .dot in the
template directory (renamed it in my VBA code that copied the file to that
location) and new child documents no longer reference the copy of the
template in the local folder, as it has a different name than the template
the file was created from.

Thanks,
Keith R

p.s. some users don't have the option to Word from local directories- I
know in our company (where some of my users are) IT 'locks' the HD so users
can't use it, including file storage, installing outside programs, etc. Of
course, we're also still on Win95 and Office97, not to mention hunting for
our food with rocks and sticks.... ;-)


Doug Robbins - Word MVP said:
Hi Keith,

It would help if you provided some information on how the "child" documents
are being created. I would think that if you use

Documents.Add Template: = "[Drive]:/[Path]/[TemplateName.dot]"

You would not have a problem.

AND you should advise your users NOT TO WORD ON DOCUMENTS FROM A FLOPPY
DISK.

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP
Is there a way to "force" .doc child documents to _first_ look to see if
the parent .dot is available in the template directory, _before_ using a
local .dot file with the same name?
 

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