diff --git a/src/file/file.ts b/src/file/file.ts index 0f4c77c82b..a78acd86e6 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -185,6 +185,14 @@ export class File { this.document.Body.addSection(sectionPropertiesOptions); } + public addSection(section: ISectionOptions): void { + this.document.Body.addSection(section.properties); + + for (const child of section.children) { + this.add(child); + } + } + public createFootnote(paragraph: Paragraph): void { this.footNotes.createFootNote(paragraph); }