TextRange

This class represents a text range.

Properties

Application through getApplication

BackColor through getBackgroundColor and setBackgroundColor

BackTransparent through getBackTransparent and setBackTransparent

Document through getDocument

End through getEnd

Font through getFont

HoriAlignment through getHoriAlignment and setHoriAlignment

Start through getStart

Text through getText and setText

Methods

importFile

insertBefore

insertAfter

insertBreak

insertParagraph

Access
  • To get the whole text range of a document, use the Content property in the Document class.
  • To get the text range of a paragraph, use the Range property in the TextParagraph class.
  • To get the text range of a header or footer, use the Range property in the TextHeaderFooter class.
  • To get the text range of a cell of a table, use the Range property in the TextTableCell class.
  • To get the text range of a section, use the Range property in the TextSection class.

Usage

TextRange provides access to the text, and the start and end of a range. It provides methods to insert text in the range, insert a paragraph before or after a table or a section, and insert breaks in the paragraph.

See examples

Use range in document: Example: Content property

Use range in paragraph: Example: Range property

Use range in header or footer: Example: Range property

Use range in cell: Example: Range property

Use range in section: Example: Range property