Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Updating Many Template References.
by Allen Wyatt
(last updated June 25, 2018)
Over the years Phillip's company has developed thousands and thousands of Word documents. They recently changed their network infrastructure to use different servers and upgraded computers for everyone in Phillip's department. When someone opens one of those pre-existing documents, it looks for a template that existed in the old infrastructure, but is no longer available. This means that the document takes a long time to open, after which point they can change the bad template reference. If Phillip has to open each of the old documents it is going to take days and days to do it, so he wonders if there is any way to change the template references more efficiently, without the need to open each document.
This can be a real bother—there are few things worse (in the office) than staring at a computer screen, waiting for some process to finish. What is happening is that Word thinks your templates are in a particular location, and it asks Windows to go get the template at that location. Windows dutifully tries (and tries and tries) to comply, repeatedly looking for the location. Each attempt times out, and the aggregate time spent in this vain attempt is quite noticeable.
A solution would be to use a macro to load each document in a directory and change the template attached to that document. The following is an example of such a macro:
Sub BatchTemplateChange() Dim sPathToTemplates As String Dim sPathToDocs As String Dim sDoc As String Dim dDoc As Document Dim sNewTemplate As String Dim i As Long On Error Resume Next Application.ScreenUpdating = False sNewTemplate = "normal.dot" 'new template name sPathToDocs = Options.DefaultFilePath(wdDocumentsPath) & "\" sPathToTemplates = Options.DefaultFilePath(wdUserTemplatesPath) & "\" sDoc = Dir(sPathToDocs & "*.doc") While Len(sDoc) <> 0 Set dDoc = Documents.Open(FileName:=sPathToDocs & sDoc) dDoc.AttachedTemplate = sPathToTemplates & sNewTemplate dDoc.Close wdSaveChanges sDoc = Dir i = i + 1 Wend Application.ScreenUpdating = True MsgBox "Finished: " & i & " documents changed" End Sub
Note that the macro loads each document in the default document location, but that doesn't necessarily speed up the loading. The benefit of using the macro is that you can start it running and allow it to work while you are away from the computer.
Additional ideas for a programmatic approach can be found at the following sites:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11404) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Updating Many Template References.
Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!
If you choose to exit Word and it asks you if you want to save changes to your Normal.dot template, it can be very ...Discover More
Changing the template associated with a couple of documents is easy, but what if a whole directory needs to be changed? ...Discover More
The first step in modifying templates is to find out where they are stored on your system. Here's the easiest way to ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.