Reputation: 175
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?
Upvotes: 1
Views: 1846
Reputation: 15863
This presents the alternatives. It is in the context of docx4j, but the options also apply in principle to POI.
Upvotes: -1