Documentation and demo for module subtemplate


This module adds a tag to include the content of an other docx document (which can be a template itself). This allows you to define subtemplates if your templates share common parts.

Order now


Input Output
Data Code
    "header": headerDoc,
    "footer": footerDoc
const headerDoc = new Docxtemplater().loadZip(new JSZip(headerZip))
const footerDoc = new Docxtemplater().loadZip(new JSZip(footerZip))

const doc = new Docxtemplater();
const inputZip = new JSZip(docX);
		header: headerDoc,
		footer: footerDoc,
const subtemplateModule = new SubtemplateModule();
const output = doc.render().getZip();

Order module subtemplate

This module is available right now, you can contact us and get the source code of the module in less than a day

To order this module, send us an email at : with the subject "Order module subtemplate"

If you are in hurry, you can send us the following information so that we can setup a license quickly :

  • Name of the legal representative of the company
  • Company name
  • Street Address of company
  • Town of company
  • Country of company
  • VAT of company or official tax identification number


Buying a module gives you support for the module for a duration of 1 year. You get free updates of the bought module during the support period, and you can contact us via email if you encounter any problems with the bought module. We will make sure that your questions are answered promptly.

Edgar Hipp

I'm the creator of docxtemplater. I work on making docxtemplater great since 2013.