Had to go through each individually but the info you provided helped. Set up a centrol location for the code so any changes (ie. new server) we wont need to modify the references.
Main Topics
Browse All TopicsHi,
I was wondering how you can change a class reference in a Microsoft Word document, in my case hundreds, without having to go through each document and manually change it one by one?
Currently there are numerous documents that I have linked to a class that I created to automate adding a signature to the bottom. Basically it is reference via: \\server\folder\file and we have recently switched our server to a newer model. The server name was FS-03 and is now FS-04, so when people try to run these documents it doesn't run the code in the class that is supposed to be referenced.
Any help would be greatly appreciated.
Thanks,
Pat
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: weinberkPosted on 2009-07-03 at 14:07:01ID: 24774428
Next time, I'd try using a central repository for the code, that updates each pc. Then don't have the code stored in the 100's of word documents, but have the code run from a single updateable file. Will be much easier to maintain.
To use VBA to edit VBA code, you need to use the VBA Extensibility feature. Detailed information is here: http://www.cpearson.com/ex cel/vbe.as px
The page has an example of finding text, but not replacing. You should be able to modify that code to do a replace, then save, then move on to the next file.
I don't know where or how these 100's of files are stored, but you might consider listing them all in a text document to make it easier for yourself to iterate through them all.
Another option might be to hack each file using a hex editor, searching for the FS-03 text and replacing it with FS-04.
Hope this helps.