Edit Attached Templates for Word Documents

April 7, 2010 — 25 Comments

If you have ever removed/renamed a server that held a Microsoft Word template (.dot file) on then you have likely come across the following issue – once the server has gone, any documents that were created from that template take a very long time to load. To fix this you have to go into each Word document and go to the Tools menu, select Templates and AddIns, clear the template path in the Attached Template box, then save and close the document. This is fine if you have a couple of documents that have this issue but when you have hundreds it becomes a bit of a problem… so I wrote a VB.NET application that will loop through all Word documents in a specified directory and reset the template, which you can download below.

You can download this app from the following page (you must have .NET Framework 2.0 or above and Microsoft Word 2003 or later installed before you run the program) :

http://www.cjwdev.co.uk/Software/EditAttachedTemplates/Info.html

As always – if you have any suggestions, problems or general feedback on this application then please leave a comment on this post or email me at support@cjwdev.co.uk

25 responses to Edit Attached Templates for Word Documents

  1. 

    This is a neat tool. I’m trying it with Word 2010 and “Normal.dotm” template files – but this tool does not work. Since I’ve only had Word 2010 on my computer, I don’t have a “Normal.dot” file. Therefore, your software does not recognize it and is unable to convert my documents. If you are able to modify it, could you let me know…or leave comment. Thanks!

    • 

      Sorry I made this program years ago before Office 2010 was around so its never been properly tested with that. If I get chance in the next couple of weeks I’ll try and test this and make sure it works with 2010 but can’t promise anything I’m afraid

      • 

        you are a life saver. could you please make this program to go through sub folders as well. that will really really help me as we have 10s of subfolders having 100s of word docs. Thank you so much.

      • 

        It does work with sub folders… just tick the option that says “include sub-directories”

  2. 

    No worries, I opened it in Word 2007 in another computer and it worked like a charm! Saved me hours of changing the template manually. 424 files in 15mins. So freaking relieved! Thanks again!

  3. 

    Absolute beauty… working like a charm.. Thanks bro.. you almost saved my job. cheers

  4. 

    Hi, this looks like a great tool for a problem I’m having right now, but it doesn’t seem to be working for Word 2010. The log says the files are updating successfully but when I open them it still is looking for the network path.
    I’m wondering if this is a .dot vs .dotm issue (there’s a Normal.dotm file in my %appdata%\Microsoft\Templates).
    Any way you’d be willing to send the source code so I could try playing with it?

    Thanks

  5. 

    I’m having the same problem here. Does it work for Word 2010?

    • 

      I’ve not used it with Word 2010 myself but I’ve heard from other people that it does work but that in some cases you need to tell the tool to set the templates to a local file path first and then set to blank afterwards (no idea why)

  6. 

    First off, the software works great, thanks! A question for you though, is there a way to make this routine work on opening a document? We have many users that save files in Outlook and try to open them straight from there. Unfortunately right now all we can do is save the documents somewhere and run the routine on them. They have hundreds of documents in their email that are slow to open because of the attached templates. Thanks again!

    • 

      Hi Jerry,

      I can’t think of any way you could directly run this program whenever they launch a Word document, I was thinking maybe you could record a VBA macro that sets the template to nothing and then stick this in every user’s Normal.dot template so that it gets executed every time they open a document but I don’t think that would work because Normal.dot would not be loaded if these documents are referencing another template (which they must be for you to get this problem in the first place). Sorry, I can’t really think how you could make it work automatically when they open it from Outlook.

  7. 

    I think the VBA add-in is probably the most appropriate solution for that scenario. It’d need to remove the link and save the document back to Outlook (transparently to the user). The time lag the first time they used the document would be no shorter, but subsequent load times would be shorter. Probably not one to try unless you have a decent grounding in VBA, though.

  8. 

    best tool ever.. easy to use.. thank you soooo much.. our company had over 2000 documents with this issue I used this tool to fix it.. THANK YOU Cjwdev !!

  9. 

    Chris…you are a god amongst men! It’s that simple!
    Like many others here I had this issue due to inheriting a system that was never looked after correctly…I’ve had people moaning about this slowness issue for ages, and just thought to look around the net…found this little tool and sighed gently in contentment! 🙂
    Ta for your efforts and for posting this tool for us to all enjoy!

    • 

      haha thanks, and yes I know that feeling well (when you find a blog post or something that gets rid of one of those annoying problems you’ve just put up with for ages) so I’m really pleased to see other people getting that from my posts/programs 🙂

  10. 

    Amazing tool, Thanks, this saved me a lot of time; work now excellent with word 2010.

  11. 

    Thank you. IN 2010 I could find no way to fix this manually but the utility you provided solved the problem.

  12. 

    I have a problem receiving 400 ‘ish Word docs each evening, converting them and printing them. Some docs refer to templates on network locations. I’ve tried this product and manually removed these references but wondered if there was a way to automate the process? I would be quite happy to take the source and plait it into my code if it is available?

    • 

      I don’t actually have the current source code for this program anymore, but you can use a tool like .NET Reflector to view the source code of the program (just like you can with most .NET programs)

Trackbacks and Pingbacks:

  1. Word / Excel talking forever to open a document | ReadMyDamnBlog.Com - January 21, 2015

    […] more about it here; https://blog.cjwdev.co.uk/2010/04/07/edit-attached-templates-for-word-documents/ NOT THE SOLUTION (For me at least); What I found that did NOT really work for me […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s