4D v17

WP Get body

Home

 
4D v17
WP Get body

WP Get body 


 

WP Get body ( wpDoc ) -> Function result 
Parameter Type   Description
wpDoc  Object in 4D Write Pro document
Function result  Object in 4D Write Pro body reference

The WP Get body command returns a reference to the body of the wpDoc 4D Write Pro document.

This reference can be passed to the:

Example  

You want to copy the body of a 4D Write Pro document to another 4D Write Pro document:

 C_OBJECT($bodySource;$rangeSource;$tempoc;$bodyTarget;$rangeTarget)
 
 $bodySource:=WP Get body([TEMPLATES]WPtemplate)
 $rangeSource:=WP Create range($bodySource;wk start text;wk end text)
 $tempoc:=WP New($rangeSource)
 
 $bodyTarget:=WP Get body([Docs]MyWPDoc)
 $rangeTarget:=WP Create range($bodyTarget;wk start text;wk end text)
 
 WP INSERT DOCUMENT($rangeTarget;$tempoc;wk replace)
 



See also 

WP Create range

 
PROPERTIES 

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

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v16 R5

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v17)