mirror of
https://github.com/dolanmiu/docx.git
synced 2026-11-30 16:47:55 +01:00
751 B
751 B
Document
The
Documentobject is the starting point of your.docxjourney, this is the literal Word Document. You add all your content such asParagraphsto thisDocument, and at the end export it however you like.
To create a new document, it is very easy:
var doc = new docx.Document();
Document properties
You can add properties to the Word document by specifying options, for example:
var doc = new docx.Document({
creator: "Dolan Miu",
description: "My extremely interesting document",
title: "My Document",
});
Full list of options:
creator
description
title
subject
keywords
lastModifiedBy
revision
You can mix and match whatever properties you want, or provide no properties.