Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Updating Many Template References.
Written by Allen Wyatt (last updated April 7, 2018)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365
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.dotx" '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 in the following article, which may be helpful to some readers:
http://www.edugeek.net/forums/scripts/35199-vba-script-change-word-document-template-location.html
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11405) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Updating Many Template References.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Templates allow you to define and collect many formatting settings that control how your documents appear. Getting a ...
Discover MoreNeed to know where templates are located in Word 2007? The locations may be the same as in earlier versions of the ...
Discover MoreLimiting which styles a user can use or add to a document can be a tricky task. Fortunately, Word has advanced to the ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-04-02 06:10:40
lil chow
Our templates are located on our office server in a folder (s:\wood templates\!! for lil only).
When working at my home office, every time I open the letterhead template from that folder it always says:
"Downloading s:\wood templates\!! for lil only\letterhead.dotx"
My problem is that I do not want to see that annoying and time-consuming dialogue. How do I prevent this from happening?
Thanks
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments