Hi,
I am using Apose Word java library to find and replace text in docx. It’s working for most cases but not able to replace (420) in the attached docx. I am able to replace other texts like 292, 158.
Can you please help?
FindReplaceOptions findReplaceOptions = new FindReplaceOptions();
findReplaceOptions.setDirection(FindReplaceDirection.FORWARD);
findReplaceOptions.setMatchCase(true);
findReplaceOptions.setFindWholeWordsOnly(true);
document.getRange().replace("420", "Quantity", findReplaceOptions);
test document.docx (13.9 KB)