The document's sources, when it has a bibliography: the part they're in (customXml/item1.xml), its properties (customXml/itemProps1.xml), and its relationships, to its properties.
Extended comments part for reply threading. Undefined when no comment threads exist.
Durable comment id part. Undefined when no comment carries a durableId.
The document's macros, when it has any: its VBA project (word/vbaProject.bin), the events of the document it handles (word/vbaData.xml), and the project's relationships, to the events.
The parts that drawings, such as charts, add to the package when it is written.
The document's theme (word/theme/theme1.xml).
Represents a Word document file.
The File class (exported as
Document) is the main entry point for creating DOCX documents. It manages all document components including content, styles, numbering, headers/footers, and media. Documents are organized into sections, each of which can have its own page settings, headers, and footers.This class handles the assembly of all OOXML parts required for a valid .docx file, including relationships, content types, and document properties.
Public Api
Example