Create Word Document
office_create_wordCreate Word documents with headings, paragraphs, lists, and tables. Specify file path and content blocks to generate .docx files.
Instructions
Create a new Word (.docx) document with rich content (headings, paragraphs, lists, tables).
Args:
filePath (string): Path where the document will be created
contents (array of content objects): Document content. Each content object has:
type: "paragraph" | "heading" | "bullet" | "numbered" | "table"
text: string (for paragraph, heading, bullet, numbered)
level: number (for heading: 1-3, for lists: 0-based level)
rows: string[][] (for table type)
bold: boolean (optional)
italic: boolean (optional)
title (string, optional): Document title
author (string, optional): Document author
Examples:
Use when: "Create a report document with headings and bullet points"
Use when: "Generate a Word document with a table of data"
Use when: "Write a meeting notes document"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path for the new Word document (e.g., './report.docx') | |
| contents | Yes | Array of content blocks to include in the document | |
| title | No | Document title | |
| author | No | Document author name |