importHeadersAndFooters

importHeadersAndFooters

BASIC / ADVANCED / PREMIUM

Imports headers and footers from an external Word document.

Description
public importHeadersAndFooters ( string $path [, string $type ] )

This method allows the insertion of Headers and Footers from an external Word document in the current Word document.

If the type parameter is ommited both headers and footers are imported.

Parameters

path

The path to the external Word document.

type

The options are:.

  • ‘headerAndFooter’ to import both header and footer (default value),
  • ‘header’ for just the header or,
  • ‘footer’ for just the footer.
Return values

Void.

Code samples

Example #1

The resulting Word document looks like: