A SubTextPart object represents a user-defined part of a document. A document consists of the main text, and additionally other pieces of text such as text frames and headers or footers, called textparts. A programmer can define further parts called subtextparts to perform operations on smaller pieces of text. Each of the main textparts has a SubTextPartCollection which can be used to add and remove subtextparts or to save the subtextpart's text.

Syntax

SubTextPart

Introduced: X15.

Methods

Method Description
getChildren Returns an array of the children of this SubTextPart.
getData Gets additional data of the subtextpart.
getHighlightColor Gets the highlight color for the subtextpart.
getHighlightMode Gets a value indicating when the subtextpart is highlighted.
getID Gets an identifier for a subtextpart.
getLength Gets the number of characters in a subtextpart.
getName Relates a user-defined name to a subtextpart.
getNestedLevel Gets the subtextpart's nested level.
getNumber Gets the subtextpart's number.
getOuterMostSubTextPart Gets a subtextpart's outermost subtextpart.
getOuterSubTextPart Gets a subtextpart's outer subtextpart.
getStart Gets the first character position (one-based) of a subtextpart.
getText Gets the subtextpart's text.
getTextFields Returns an array of static text field information objects.
save Saves the subtextpart in a certain format and sends the result back asynchronously by calling a given callback function.
scrollTo Sets the current input position to the beginning of a subtextpart and scrolls it into the visible part of the document.
setData Sets additional data of the subtextpart.
setHighlightColor Sets the highlight color for the subtextpart.
setHighlightMode Sets a value indicating when the subtextpart is highlighted.
setID Sets an identifier for the subtextpart.
setName Sets the name of a subtextpart.