User`s guide
Create a Microsoft Word Template
13-111
Create a Microsoft Word Template
Use one of these approaches to create a Word template for generating a report.
• Use mlreportgen.dom.Document.createTemplate to create a copy of the DOM
API default Word template that you can then customize. For example,
mlreportgen.dom.Document.createTemplate('mytemplate','docx');
• Use an existing Word template (for example, a report template for your organization)
and customize the template to use with the DOM API.
• Create a Word template from scratch.
If you copy an existing template that is not based on the DOM API default Word
template, apply any standard Word styles such as Title, Heading 1, TOC 1, List 1,
Emphasis, etc. to an element in the template. You can apply the styles to placeholder
content and then remove the content. That process creates instances of the standard
styles in the template style sheet.
See the Word documentation for information about how to create templates and to copy
styles from one template to another.
Related Examples
• “Add Holes in a Microsoft Word Template” on page 13-112
• “Modify Styles in a Microsoft Word Template” on page 13-117
• “Create an HTML Template” on page 13-122