eed
12-21-2005, 06:08 PM
Hi, all,
I'm creating and formatting a Word document (based on a .dot template) from VBA.
I'd like to be able to find all instances of a word in the document and change the background color and font color of just that word. So, for example, every instance of the word "Yellow" should have the background changed to black and the font changed to yellow.
Using the VBA recorder, I can see the code Word uses to execute a Find and manipulate an individual found item... but I'm getting myself all confused about how I could write some sort of loop that would automatically search the whole document and change every instance. http://vbaexpress.com/forum/images/smilies/104.gif
Help is deeply appreciated!!!
~ eed
I'm creating and formatting a Word document (based on a .dot template) from VBA.
I'd like to be able to find all instances of a word in the document and change the background color and font color of just that word. So, for example, every instance of the word "Yellow" should have the background changed to black and the font changed to yellow.
Using the VBA recorder, I can see the code Word uses to execute a Find and manipulate an individual found item... but I'm getting myself all confused about how I could write some sort of loop that would automatically search the whole document and change every instance. http://vbaexpress.com/forum/images/smilies/104.gif
Help is deeply appreciated!!!
~ eed