Skip to main content
Version: 21 R4 BETA

WP Paragraph range

WP Paragraph range ( targetObj : Object ) : Object

ParameterTypeDescription
targetObjObject→Range or element
Function resultObject←Range addressing only paragraphs

Description​

The WP Paragraph range command returns a specific range object that addresses only the paragraphs that intersect with the targetObj you passed as parameter. The paragraph range object returned can be used by WP GET ATTRIBUTES and WP SET ATTRIBUTES to handle paragraph attributes only.

In targetObj, you can pass:

  • a range, or
  • an element (table / row / paragraph / header / footer / body / section / subsection)

Example​

You want to define padding for the paragraphs only:

 $oParagraphs:=WP Paragraph range($oSelection)
 WP SET ATTRIBUTES($oParagraphs;wk padding;20)

See also​

WP Picture range
WP Selection range
WP Text range