Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing text in multiple documents.

Status
Not open for further replies.

debbiezzzzz

IS-IT--Management
Aug 24, 2007
58
US
Good Day all,

I had an odd user request today.... They have about 20 word documents in a folder. Each document has the word Fax in it followed by a fax number.

Fax: xxx-xxx-xxxx

They would like to change the actual fax number in all 20 documents, by only changing it in one. Now, I know we could use building blocks and stuff in the future, but is there a way to have word do this with regular .doc files?
A kind of search / replace without having to manually open the files?

Thanks
 
I thank both of you for helping, but it appears both solutions assume these are fields in the existing documents. As of now, it's just text.

I think I might be able to combine macro code for search and replace text with the macro on Greg Maxey's web site however.

Thank You :)
 
They would like to change the actual fax number in all 20 documents, by only changing it in one. "

No, my post did not assume there were fields. I was suggesting that you PUT the text as a field.

Main Doc (say, yadda.doc): Fax: xxx-xxx-xxxx

If xxx-xxx-xxxx (in yadda.doc) is bookmarked as FaxNumber, then the other docs could have:

{INCLUDETEXT "c:\\zzz\\yadda.doc" FaxNumber}

Note the double slashes.

Now if you change xxx-xxx-xxxx in yadda.doc to "blah7234 ghgfht", well, all the other documents will have...

blah7234 ghgfht

That is what INCLUDETEXT is for. Which, to me, seems like it does:

"They would like to change the actual fax number in all 20 documents, by only changing it in one."

faq219-2884

Gerry
My paintings and sculpture
 
Greg's process for processing all documents in a folder happens to use fields as an example. You can substitute the field processing for your own, with or without fields.

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top