4D v17

WP Create paragraph range

Home

 
4D v17
WP Create paragraph range

WP Create paragraph range 


 

WP Create paragraph range ( targetObj ) -> Function result 
Parameter Type   Description
targetObj  Object in Range or element reference or 4D Write Pro document
Function result  Object in Range addressing only paragraphs

WP Create paragraph range was named WP Get paragraphs in previous versions of 4D Write Pro. It has been renamed for clarity.

The WP Create paragraph range command returns a specific range object that addresses only the paragraphs contained in 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 reference (table / row / paragraph / header / footer / body), or
  • a 4D Write Pro document.

Example  

You want to define padding for the paragraphs only:

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



See also 

WP Create picture range
WP Get selection

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language
Number: 1346

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v15 R4
Modified: 4D v16 R5
Renamed: 4D v16 R6

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v17)