Skip to main content
Version: Next

WP Get body

WP Get body ( wpDoc ) -> Function result

ParameterTypeDescription
wpDocObject🡒4D Write Pro document
Function resultObject🡐4D Write Pro body

Description

The WP Get body command returns the body element of the wpDoc 4D Write Pro document.

This element can be passed to the:

Example

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

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

See also

WP Text range