Access Ranges in Document

Aspose.Words - Access Ranges in Document

Use the Range.getText to 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 the Range.text to retrieve text of the range.

Java

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

Download Running Code

Download Sample Code