Example: Document property

This example gets the document to which the range belongs.

  TextRange range = paragraph.getRange();
  Document doc = range.getDocument();

Related information

Document property