MacResource
find 'n' replace in Word: insert text before every occurrence of a style - Printable Version

+- MacResource (https://forums.macresource.com)
+-- Forum: My Category (https://forums.macresource.com/forumdisplay.php?fid=1)
+--- Forum: Tips and Deals (https://forums.macresource.com/forumdisplay.php?fid=3)
+--- Thread: find 'n' replace in Word: insert text before every occurrence of a style (/showthread.php?tid=93705)



find 'n' replace in Word: insert text before every occurrence of a style - Greg - 03-04-2010

I've got a document with two character styles; everything is either one style or the other.

I want to take this Word document and convert the information into XML, for storage or parsing.

So, I want to surround every chunk of text that has the style questionText with and tags.

Then, surround every chunk of text that has the answerText style with and .

I can do RegEx, and am playing with Word's Find/Replace wildcards feature, but am just not seeing how to pull this off.

VBA would be good, but I'm on the Mac here. :-)


Re: find 'n' replace in Word: insert text before every occurrence of a style - Bread Crumbs - 03-04-2010

Load Word 2003 on your windows partition and I will walk you through it.