Hi,
I have many word documents stored in a folder. Can I search through these documents for specific keywords? Does ASPOSE support such a feature? I use Aspose.Total for Java.
Can I extract only the text of the word documnet ignoring formatting and styling ?
Kindly help me out with this requirement.
Regards,
Kiran
Hi Kiran,
Thanks for your inquiry.
Kiran Babu:
Can I search through these documents for specific keywords? Does ASPOSE support such a feature? I use Aspose.Total for Java.
You can achieve your requirement by implementing IReplacingCallback interface. Please use the same approach shared at following documentation link to find the text.
https://docs.aspose.com/words/java/find-and-replace/
Please read the following article about ‘Find and Replace Overview’.
https://docs.aspose.com/words/java/find-and-replace/
Kiran Babu:
Can I extract only the text of the word documnet ignoring formatting and styling ?
You can save the Word document to Text file format or export the document Node to text using Node.toString method. Please check the following code example for your kind reference and let us know if you have any more queries.
Document doc = new Document(MyDir + "in.docx");
// Exports the content of document node into text format.
System.out.println(doc.toString(SaveFormat.TEXT));
doc.save(MyDir + "Out.txt", SaveFormat.TEXT);