Moving Office templates


One of our customers use templates to simple write their technical documentation. They are now in the process of re-organizing their file structure which means they now have lots of documents and spreadsheets that can't find the templates they should be connected to?

Is there a quick and simple way to reconnect a document or spreadsheet to its missing templates?

Who is Participating?
DrTribosConnect With a Mentor Commented:
Well I guess there are a few ways you could approach this, do you want to do all documents in 1 go or can you do them individually when they are opened by users?

To do in 1 go you would use VBA or a VB script to open each document, change the template, and then close.

To do on the fly you would have VBA in a template located in the applications startup folder.  This code would run whenever a user opened a document - it would reassign the template path and let the user get on withe the task of editing.  The code could be triggered manually or automatically.

In either case the code would not need to be overly complex, you are simply changing the path names not the actual template - right?

E.g. In Word it would look something like this:

If activedocument.attachedtemplate.path = "xyz" then
  activedocument.attachedtemplate.path = "xy"
end if

Are the documents in a common folder?
Could use a macro to reassign the new template parh based on the old template path.  You might back up your directory first though.
joebilekAuthor Commented:
The documents and templats are both in a common folder. It's a matter of several templates and plenty of documents.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

joebilekAuthor Commented:
Sorry about the delay, we havent still tested this suggestion with the client, will update as soon as this is done.
No worries.
joebilekAuthor Commented:
A good idea, but in the end the customer decided to just do it manually.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.