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

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?



Sat, 31 Dec 2005 01:03:11 GMT  
 updated question: .doc references .dot in same directory, instead of template directory (not what I wanted)
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

Quote:
> 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?



Sat, 31 Dec 2005 13:18:14 GMT  
 updated question: .doc references .dot in same directory, instead of template directory (not what I wanted)
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....  ;-)



Quote:
> 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

<snip>

- Show quoted text -

Quote:
> > 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?



Sat, 31 Dec 2005 20:04:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. how do I use wor97 doc/dot as a template

2. Finestra di errore di sistema in fase di copia files

3. Update a Table of Contents on a doc created from a template Word 2000

4. template question/normal.dot/autonew macro

5. template question/normal.dot/autonew macro

6. Question for Peter Jamison On Copying Word Template to New Doc on the fly

7. Question: Creating a new word doc based a template within a VB excutable

8. Get application directory instead of current directory.

9. How di I get the windows directory??

10. Shared Templates\ Update templates?

11. outlook Bar control di Daniele di Alessandro

12. enumerazione di risorse di rete!

 

 
Powered by phpBB® Forum Software