Link to home
Start Free TrialLog in
Avatar of borgmember
borgmemberFlag for United States of America

asked on

Templates Moved To Different Server - Now documents open really slow

Hi,

Heres what we used:

Server1 - \\server1\templates\jobs\etc.....

Each time users wanted to create a job document they used one of the templates in a folder like above. All works fine and well. Documents always open fast.

Everything moved to Server2

Server2 - \\server2\templates\jobs\etc....

Now every document that they open that was created with a template on the old server opens extremely slow. From what we can gather it must be timining out trying to look for the original templates on the old server.
New documents or documents made from the templates in the new location are fast.

Is there a utility or program to update this metadata that must be embedded in the documents themselves?

I know I could fool office with a modified DNS entry, but thats a bandaid, I want a fix.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of r_gibson
r_gibson

OK. I have done some editing of my code and it's now as shown below.

Questions is on what line should I put the code to skip if the password is wrong?

Also does the code look correct? I am really feeling my way in the dark here. Coding is not my skill but I am trying.
Sub FindFiles(strFolder As String, strFilePattern As String)
    Dim strFileName As String
    Dim strFolders() As String
    Dim iFolderCount As Integer
    Dim i As Integer
    Dim strFilePath As String
    Dim strPath As String
    Dim intCounter As Integer
    Dim OldServer As String
    Dim objDoc As Document
    Dim objTemplate As Template
    Dim dlgTemplate As Dialog
    Dim nServer As Integer
 
 'collect child folders
    strFileName = Dir$(strFolder & "\", vbDirectory)
    Do Until strFileName = ""
        If (GetAttr(strFolder & "\" & strFileName) And vbDirectory) = vbDirectory Then
            If Left$(strFileName, 1) <> "." Then
                ReDim Preserve strFolders(iFolderCount)
                strFolders(iFolderCount) = strFolder & "\" & strFileName
                iFolderCount = iFolderCount + 1
            End If
        End If
        strFileName = Dir$()
    Loop
 
    'hardcode the name of the old server.
    
    OldServer = ""
    nServer = Len(OldServer)
    strFilePath = InputBox("What is the folder location that you want to use?")
 
    If Right(strFilePath, 1) <> "\" Then strFilePath = strFilePath & "\"
 
     strFileName = Dir(strFilePath & "*.doc")
 
     Do While strFileName <> ""
 
     Set objDoc = Documents.Open(strFilePath & strFileName)
 
     Set objTemplate = objDoc.AttachedTemplate
 
     Set dlgTemplate = Dialogs(wdDialogToolsTemplates)
 
     strPath = dlgTemplate.Template
 
   
 
     If LCase(Left(strPath, nServer)) = LCase(OldServer) Then
 
     objDoc.AttachedTemplate = NormalTemplate
 
    End If
 
 
 
    strFileName = Dir()
    objDoc.Save
    objDoc.Close
 
    Loop
 
 
 
    Set objDoc = Nothing
    Set objTemplate = Nothing
    Set dlgTemplate = Nothing
 
 
 
End Sub

Open in new window