Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
HWhite HWhite is offline
external usenet poster
 
Posts: 3
Default Templates and add-ins problem

I have thousands of Word documents on a file server that are taking too long
to load when opening in Word 2003. After reading through the discussion
groups, I've confirmed that the document template listed in the "templates
and add-ins" field of each document are pointing to a location that no longer
exists, and was on a network share. It is taking our users a minute to two
minutes to open each of these documents.

I need a solution that does one of the following...

1. Updates each document with the new location of the template.
(\\oldserver\templates\templatename.dot to
\\newserver\templates\templatename.dot)
2. Erases the entry in the templates and add-ins field altogether (will
this cause issues?)
3. Reduce or eliminate the time-out setting for searching for the template.

I really need a solution to this quickly, so hopefully somebody out there
can help me. Also, I don't know VBA, so if your solution involves running
scripts, I'll need a little extra hand-holding.

Thanks very much.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Templates and add-ins problem

Provided the document template names are the same in the old and new
template folders (no sub folders for example) the following macro *should*
change the template folder location for files in a selected folder.

Change the path to the actual path of the new template folder in the line
sNewPath = "\\newserver\templates\"
Note that if a template of the same name as the original template is not
present in that folder no change is made.

The macro should not affect those files based on normal.dot. However while
tests on a standalone machine are all very well, introducing your network
into the mix may not result in the desired outcome. However feel free to
test it on copies of some of your documents before running it on the live
files.

http://www.gmayor.com/installing_macro.htm

Sub ChangeTemplateFolder()
Dim iFld As Integer
Dim strCodes As String
Dim FirstLoop As Boolean
Dim strFileName As String
Dim strPath As String
Dim oDoc As Document
Dim sTemplate As Template
Dim sNewPath As String
Dim i As Long

sNewPath = "\\newserver\templates\"
With Dialogs(wdDialogCopyFile)
If .Display 0 Then
strPath = .Directory
Else
MsgBox "Cancelled by User"
Exit Sub
End If
End With

If Documents.Count 0 Then
Documents.Close savechanges:=wdPromptToSaveChanges
End If
FirstLoop = True
If Left(strPath, 1) = Chr(34) Then
strPath = Mid(strPath, 2, Len(strPath) - 2)
End If
strFileName = Dir$(strPath & "*.doc")

While Len(strFileName) 0
Set oDoc = Documents.Open(strPath & strFileName)

Set sTemplate = ActiveDocument.AttachedTemplate
On Error Resume Next
With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = sNewPath & sTemplate.Name
End With
oDoc.Close savechanges:=wdSaveChanges
Set oDoc = Nothing
GetNextDoc:
strFileName = Dir$()
Wend
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


HWhite wrote:
I have thousands of Word documents on a file server that are taking
too long to load when opening in Word 2003. After reading through
the discussion groups, I've confirmed that the document template
listed in the "templates and add-ins" field of each document are
pointing to a location that no longer exists, and was on a network
share. It is taking our users a minute to two minutes to open each
of these documents.

I need a solution that does one of the following...

1. Updates each document with the new location of the template.
(\\oldserver\templates\templatename.dot to
\\newserver\templates\templatename.dot)
2. Erases the entry in the templates and add-ins field altogether
(will this cause issues?)
3. Reduce or eliminate the time-out setting for searching for the
template.

I really need a solution to this quickly, so hopefully somebody out
there can help me. Also, I don't know VBA, so if your solution
involves running scripts, I'll need a little extra hand-holding.

Thanks very much.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem keeping templates consistent Lefty Microsoft Word Help 1 February 12th 07 10:36 AM
problem with .dot templates Alberto Pinto Page Layout 4 October 2nd 06 08:20 PM
Templates Problem Joe McGuire Microsoft Word Help 1 February 8th 06 09:18 PM
templates or brochure problem otterlover Page Layout 0 March 16th 05 04:49 PM
Problem with word templates Luis Estevens Microsoft Word Help 3 January 27th 05 02:10 PM


All times are GMT +1. The time now is 11:02 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"