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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.