Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2007

Tip: Looking for answers? Try searching our database.

Attached template problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JRob - 27 Apr 2007 12:21 GMT
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.
Jonathan West - 27 Apr 2007 13:43 GMT
> 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.
[quoted text clipped - 4 lines]
> 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.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

JRob - 27 Apr 2007 16:07 GMT
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.
Ed - 28 Apr 2007 20:34 GMT
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/microsoft.public.word.docmanagement/browse_thre
ad/thread/c5e4bd6285aa83bf/0134d21aaced3d22?lnk=st&q=&rnum=1&hl=en#0134d21aaced3
d22


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

> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.