Attached template problem

J

JRob

We have word documents on our network (Word 2002, Windows 2000) that
used to be attached to templates on a server that no longer exists.
The attached template has since been reset to normal.dot as all
documents have been opened and resaved programically.

The documents are, however, taking a long time to open and I can only
imagine it is because they still hold a reference somewhere to the old
template. If I view the documents in the visual basic editor the
reference attached is Normal.dot but if I open the Templates and
Addins box the attached template is pointing at the old template. Is
there anyway to capture this entry? Msgbox
Activedocument.attachedTemplate just gives Normal.dot. If I were able
to reset this I'm sure my delay problems would disappear.
 
J

Jonathan West

JRob said:
We have word documents on our network (Word 2002, Windows 2000) that
used to be attached to templates on a server that no longer exists.
The attached template has since been reset to normal.dot as all
documents have been opened and resaved programically.

The documents are, however, taking a long time to open and I can only
imagine it is because they still hold a reference somewhere to the old
template.

Correct. it is a bug in Word that it waits a long time to try and find a
nonexistent network location if the attached template is on a network drive.
There is a hotfix you can get from Microsoft to fix this.

http://support.microsoft.com/kb/830561/en-us?spid=2530&sid=49
http://support.microsoft.com/kb/823372/



If I view the documents in the visual basic editor the
reference attached is Normal.dot but if I open the Templates and
Addins box the attached template is pointing at the old template. Is
there anyway to capture this entry? Msgbox
Activedocument.attachedTemplate just gives Normal.dot. If I were able
to reset this I'm sure my delay problems would disappear.

Normal.dot is the template that is attached when Word finally gives up on
the hope of ever finding the original template. One of the articles I listed
above has code for running a batch process on a folder full of files to make
that change permanent.
 
J

JRob

Thanks for your reply Jonathan

I have looked into this before and unfortunately the hot fixes only
apply if running XP (most pcs here are still Windows 2000). However,
the link with the code looks hopeful.
 
E

Ed

Hi JRob,

I did a program some time ago to switch the attached templates in a bunch of
documents from an old non-existent server to a new one.

In my code, to get the path of the currently attached template I used

Application.Dialogs(wdDialogFileSummaryInfo).Template

I can't any longer remember why I didn't use the AttachedTemplate property
but the other thing seems to work.

(When actually attaching the new template to the document I did use the
AttachedTemplate property.)

Also, it might be worth your while to have a look at this thread:

http://groups.google.co.uk/group/mi...d3d22?lnk=st&q=&rnum=1&hl=en#0134d21aaced3d22

It has some useful info by Herb Tyson and Beth Melton relevant to this sort
of thing.

I won't be around for a couple of days so I won't be in a position to reply
if you have any queries about this.

Regards.

Ed
 

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