Word opened Document slow

G

Guest

Hi,

we have written a DOT with an older version of WinWord. The document was
saved on an server (for example -> \\Server\Document). With this DOT are
created many DOCs on the same server.
Now the server is old and we changed it with a new server with an other name
an IP-address (for example -> \\NewServer\OtherDocumentFolder).
If we open any document we must wait 2 - 3 minutes for the opening.

After an look in the DOT- /DOC-file (with an hexeditor) we see the old
servername and path in this documents. Apparent word go to the server and
path and after an timeout (while the server isn't there), the document is
opened.

Have any the same problem and how can we resolve this?

Bye Ralf
 
G

Guest

I think this may help..

Go to Tools-->Templates and Addins
Check the entry in 'Dcoment Template', If this one is referring to your old
server delete this entry, save the doc and try to re-open it.

HTH,
 
G

Guest

Hi Pranav,

thank you for you answer. Yes, you intended right....

In this dialog was the old server and path. Now we need to script Word to
change this in so many DOC-files...

Bye Ralf
 
G

Graham Mayor

A variation on the following macro may do the trick. This opens all the
documents in a selected folder and attaches the chosen template here
"D:\Word Templates\Letter Heads\Letter.dot" when the template attached is
currently normal.dot.

Establish what the documents you want to change report as their attached
template with the first macro and then use that information in the second -
replace D:\Word Templates\Letter Heads\Letter.dot with your new template
path.

Test on a small sample of documents and if it works as planned, run it
overnight on the folder containing the documents.

Sub WhichTemplate()
MsgBox ActiveDocument.AttachedTemplate
End Sub

Sub BatchChangeTemplate()
Dim myFile As String
Dim PathToUse As String
Dim MyDoc As Document
Dim iFld As Integer

With Dialogs(wdDialogCopyFile)
If .Display <> 0 Then
PathToUse = .Directory
Else
MsgBox "Cancelled by User"
Exit Sub
End If
End With
If Documents.Count > 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
If Left(PathToUse, 1) = Chr(34) Then
PathToUse = Mid(PathToUse, 2, Len(PathToUse) - 2)
End If
myFile = Dir$(PathToUse & "*.do?")
While myFile <> ""
Set MyDoc = Documents.Open(PathToUse & myFile)
If ActiveDocument.AttachedTemplate = _
"Normal.dot" Then
With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = _
"D:\Word Templates\Letter Heads\Letter.dot"
End With
End If
MyDoc.Close SaveChanges:=wdSaveChanges
myFile = Dir$()
Wend
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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