Represents a Word document file.
The File class is the main entry point for creating DOCX documents. It manages all document components including content, styles, numbering, headers/footers, and media.
const doc = new Document({ sections: [{ children: [ new Paragraph("Hello World"), ], }],}); Copy
const doc = new Document({ sections: [{ children: [ new Paragraph("Hello World"), ], }],});
Represents a Word document file.
The File class is the main entry point for creating DOCX documents. It manages all document components including content, styles, numbering, headers/footers, and media.
Example