Access Ranges in Document

Aspose.Words - Access Ranges in Document

Use theRange.getTextto retrieve plain, unformatted text of the range.

Java

Range range = doc.getRange();
String text = range.getText();

Apache POI HWPF XWPF - Access Ranges in Document

Use theRange.textto retrieve text of the range.

Java

Range range = doc.getRange();
String text = range.text();

Download Running Code

Download Sample Code