Trying to wrap HTML tags around multiple different words in one operation
Hey.
Ok, I want to do something which to me seems pretty straight forward but I can't think how to do it.
In a body of text I have managed to find and use a vb macro script which will select and highlight multiple words. e.g. I can tell it to find "yellow,green,horse,cat" etc and it will find each of these words separately within the text and highlight them. This is awesome.
However, is there a way to get ms word to replace each word I tell it to find, with the same word but with HTML tags either side?
e.g. In a body of text, I want it to find every instance of the words "yellow", "green" etc. and replace each "yellow", with "<command>yellow</command>" and each "green" with "<command>green</command>". Is it possible to do this in one go if you tell it which words to look for, or would this be an operation I need to do separately for each different word?
I ask because I need to find about 200 separate words in a large body of text and have each word basically wrapped in one specific HTML tag. Seems simple enough if it was only one word I needed to find but multiple words make it more complicated.
Thanks for any help guys, its much appreciated!
|