PDA

View Full Version : Find and Replace words in Word 2007 from an Excel Spreadsheet



Lexaquillia
11-30-2011, 12:09 AM
Hi All,

Been struggling with this problem for a bit. I've tried searching the forums, and while I see that others have had similar questions, they where not answered.

Basically this is my situation. In excel I have a sheet that has two columns a "Find" columns and a "Replace" column. I'd like a macro that will be able to search a word document and replace all instances of the words or phrases in the "find" column with the appropriate word or phrase in the "Replace" column.

I've managed to write a macro that can do this if the table of the find and replace columns is in word, but not if it is in excel. The reason I'd like to use excel instead of word, is that my table is now about 1285 rows long trying to manage/edit the table in word is very cumbersome.

Any ideas on how this can be done, or if it is even possible ?

gmaxey
11-30-2011, 06:25 AM
My VBA Find and Replace will do this:
http://gregmaxey.mvps.org/VBA_Find_And_Replace.htm

I have never tested with 1285 entries so it may not work as expected.

Lexaquillia
11-30-2011, 06:58 AM
Hi gmaxey,

Thanks for the link. I'll have a look and report back :)

kind regards

Lex