---
title: "Access Ranges in Document"
---


## Aspose.Words - Access Ranges in Document

Use the **Range.getText** to retrieve plain, unformatted text of the range.

**Java**

{{< highlight csharp >}}
Range range = doc.getRange();
String text = range.getText();
{{< /highlight >}}

## Apache POI HWPF XWPF - Access Ranges in Document

Use the **Range.text** to retrieve text of the range.

**Java**

{{< highlight csharp >}}
Range range = doc.getRange();
String text = range.text();
{{< /highlight >}}

## Download Running Code

- [GitHub](https://github.com/aspose-words/Aspose.Words-for-Java/releases/tag/Aspose.Words_Java_for_Apache_POI_WP-v1.0.0)

## Download Sample Code

- [GitHub](https://github.com/aspose-words/Aspose.Words-for-Java/tree/master/Plugins/Aspose_Words_for_Apache_POI/src/main/java/com/aspose/words/examples/featurescomparison/ranges)

{{% alert color="primary" %}}

For more details, visit [Retrieving Plain Text](/words/java/working-with-ranges/#workingwithranges-retrievingplaintext).

{{% /alert %}}
