• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1064
  • Last Modified:

Word 2010 missing template timeout

Users opening Word documents in Word 2010 in our AD environment are having to wait a minute or so while Word looks for the original template, which is timing out as the server is no longer there. Although it's possible to circumvent this by opening the file from within Word and then pressing Escape to cancel loading of the template, this isn't as convenient as double clicking the file in Windows Explorer. Is it possible to change the timeout using group policy so the waiting time is lowered to, say, 5 seconds, or the behaviour if the template file can't be opened initially?
0
Ian Gooding
Asked:
Ian Gooding
  • 2
2 Solutions
 
GrahamSkanCommented:
I think that it will be faster if a server with the old name is re-instated. It doesn't have to hold the template or even the folder. In the longer term, consider changing the attached template.

This macro will recurse into a folder structure looking for documents with templates on the old server and then changing the location:
Option Explicit

Sub ChangeTemplatesServer()
  FindFiles "C:\DocumentFolders", "*.doc*"
End Sub

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 doc As Document
   
    '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
   
    'process files in current folder
    strFileName = Dir$(strFolder & "\" & strFilePattern)
    Do Until strFileName = ""
            DoEvents
            Set doc = Documents.Open(strFolder & "\" & strFileName)
            If doc.AttachedTemplate.Path = "\\Oldserver\templates\" Then
                doc.AttachedTemplate = "\\NewServer\templates\" & doc.AttachedTemplate.Name
                doc.Close wdSaveChanges
            Else
                doc.Close wdDoNotSaveChanges
            End If
        strFileName = Dir$()
    Loop
   
    'look through child folders
    For i = 0 To iFolderCount - 1
        FindFiles strFolders(i), strFilePattern
    Next i
End Sub

Open in new window

0
 
Ian GoodingAuthor Commented:
That's really helpful, thanks. The server migration is one of those things that perhaps I'll work out how to do in a different way next time in order to retain the server name. It's actually a DFS root that I've moved to a new server as we decommissioned the old one. I'll try reinstating the server without the shares to see if that speeds things up for now.

The macro doesn't seem to work for me. I created a suitable Word macro and ran it with a test set, and it looks as though the doc.AttachedTemplate.Path has become the default template for my copy of Word by the time this is executed, so it's not showing the one embedded in the document, so instead of being "\\deadserver\resources\templates\" it's showing "C:\Users\<myusername>\AppData\Roaming\Microsoft\Templates". However, if the information is available that would be a great way to resolve the problem - as I have nearly a million documents to go through.
0
 
uwantedmeCommented:
Rather than use a macro you could always change the timeout to a set number of seconds:
http://support.microsoft.com/kb/970270
Just change the version of Office using 14, 12 etc



Example
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options

details of the subkey are in the Microsoft kb
0
 
Ian GoodingAuthor Commented:
I discovered the macro option as set would only work under very specific circumstances (Office 2003 required if I recall correctly, which I no longer have on any of our systems), though it's very helpful to see how to manipulate the filing system like this. So I have implemented the timeout as despite having removed the servers listed in the template path from the domain Word still occasionally goes looking for them.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now