Skip to main content
Version: 20 R7 BETA

WP New header

WP New header ( wpSection ) -> Function result

ParameterTypeDescription
wpSectionObject4D Write Pro section or subsection
Function resultObject4D Write Pro header

Description

The WP New header command creates and returns the header associated to the section or subsection defined by the wpSection parameter.

If a header element is already defined for the section or subsection, an undefined object is returned and an error is generated.

Example

You want to create a header for the right pages of a section:

 var $section;$subsection;$header : Object
  //Retrieve the first section
 $section:=WP Get section(wpDoc;1)
  //Retrieve the right subsection of the first section
 $subsection:=WP Get subsection($section;wk right page)
 
  //If the subsection exists, set the header
 If($subsection#Null)
    $header:=WP New header($subsection)
 End if

See also

WP DELETE HEADER
WP Get header
WP New footer