wp.getIndent

Syntax wp.getIndent ()

Params None required.

Action Determines the number of pixels the indent is set to for the selection in the target document. If the selection is empty, this verb applies to the paragraph in which the selection appears. The indent is defined as the number of pixels to the right (if the

indent is positive) or left (if it is negative) of the left margin setting the indent marker is positioned on the ruler.

Returns A number indicating the number of pixels set for the indent.

Examples edit (@examples.testText2);
wp.getIndent ()

   » 0

By default, the indent is 0.

edit (@examples.testText2)

   » true

Now, display the ruler in the document and move the indent marker to the 1/2-inch point on the ruler. Now type and execute:
wp.getIndent ()


   » 36 // Indent is given in pixels

edit (@examples.testText2)

   » true

Now display the ruler in the document. Move the left margin marker to the 1/2-inch point and then move the indent marker to the zero point on the ruler. Now type and execute:
wp.getIndent ()


   » -36

The indent that's returned is given in pixels, in this case as a negative value because the indent is to the left of the left margin setting

Notes If the indent is to the left of the left margin setting, it is a negative value.

See Also wp.setIndent

Discuss