1
votes

I would like to open a .doc file search for some text and replace it with other text.

I know of the RANGE.replaceText(placeholder, newString) method but it is unreliable when you have mergfields, or other special formatting in the document and can mess the entire document up.

I am wondering if there is an alternative method, to manually search through the document paragraphs and grab the string and use the replaceText method of each string?

1

1 Answers

-1
votes

This presents the alternatives. It is in the context of docx4j, but the options also apply in principle to POI.