importHeadersAndFooters

importHeadersAndFooters

BASIC / ADVANCED / PREMIUM

Imports headers and footers from an external Word document.

Description
public void importHeadersAndFooters(String source) throws Exception
public void importHeadersAndFooters(String source, String type) throws Exception

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

If the type parameter is omitted 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
  • "footer" for just the footer
Code samples

Example #1

The resulting Word document looks like: