We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Finding and Replacing not performing

Hi,


I have a specific document where when I search for a specific paragraph and try to replace the contents, fail as it cannot appear to find the text.

The original text to find is coming from a Document first saved as HTML. Then the HTML presented to the user and HTML stripped text is used to for the basis of the search.

Most of the time this works however I have one instance where the text is not found.

After looking closer at the HTML conversion of the doc I can see the paragraphs contain a lot of repeated elements with the same font style attribute…

Can this be the reason the find and replace is not working because the paragraphs in the document have a lot of style information

I am using the basic search and replace call on the document, not a custom Replace class.

Any thoughts / ideas appreciated,

Thanks,





Hi David,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input document.
  • Please

    create a standalone/runnable simple Java application that demonstrates the code (Aspose.Words code) you used to generate
    your output document

  • Please attach the output Word file that shows the undesired behavior.
  • Please
    attach your target Word document showing the desired behavior.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.