What can you do with it?
The/word-document-create command enables you to create Word documents (.docx) programmatically from data. Generate professional reports, invoices, letters, contracts, and more without needing a template. Build documents with dynamic tables, formatted text, headers, footers, and custom styling - all from scratch using your data.
This skill creates documents from pure data, making it perfect for dynamic layouts where the content structure changes based on your data. No template required!
How to use it?
Basic Command Structure
Parameters
Required:content_data- JavaScript object containing the content and structure for your document- Can include paragraphs, tables, headings, formatted text
- Supports nested data structures for complex documents
filename- Custom name for the output file (default: “document.docx”)page_setup- Page configuration:size- “letter” or “a4” (default: “letter”)orientation- “portrait” or “landscape” (default: “portrait”)margins- Object with top, bottom, left, right in inches
header_content- Text or data for document headerfooter_content- Text or data for document footer
Response Format
The command returns:Examples
Basic Usage - Simple Report
Advanced Usage - Invoice with Table
Complex Usage - Multi-Department Report
Content Structure Guide
Basic Elements
Paragraphs:Tables
Lists
Use Cases
Reports & Analytics
- Sales reports with charts and tables
- Performance dashboards
- Executive summaries
- Monthly/quarterly reviews
Business Documents
- Invoices and receipts
- Contracts and agreements
- Proposals and quotes
- Purchase orders
Letters & Communications
- Form letters with personalization
- Offer letters
- Notification letters
- Certificates
Dynamic Content
- Variable-length sections based on data
- Conditional content inclusion
- Repeated structures (teams, products, locations)
- Data-driven tables
Formatting Options
Text Styling
- Bold, Italic, Underline, Strikethrough: Apply emphasis
- Highlight: Background highlight colors (yellow, green, cyan, magenta, red, etc.)
- Superscript / Subscript: For footnotes, formulas (H₂O), ordinals (1ˢᵗ)
- All Caps / Small Caps: Capitalization styles
- Font: Arial, Times New Roman, Calibri, etc.
- Size: 8pt to 72pt
- Color: Any hex color (#FF0000)
Paragraph Formatting
- Alignment: Left, Center, Right, Justified
- Spacing: Before/after paragraph
- Indentation: First line, hanging, or both
- Line spacing: Single, 1.5, Double
Page Layout
- Margins: Custom top, bottom, left, right
- Size: Letter (8.5x11”), A4 (210x297mm)
- Orientation: Portrait or Landscape
- Headers/Footers: Custom text, page numbers
Best Practices
Data Organization
- Structure your data hierarchically - Use nested objects for related content
- Use arrays for repeated elements - Tables, lists, sections
- Separate content from formatting - Define structure first, then apply styles
- Include all necessary data - The skill builds from data alone
Document Design
- Use headings for structure - H1 for titles, H2 for sections
- Apply consistent spacing - Standard spacing between elements
- Use tables for tabular data - Don’t try to align text manually
- Include page numbers - In footer for multi-page documents
Performance Tips
- Small documents (<10 pages): Process instantly
- Medium documents (10-50 pages): ~5-10 seconds
- Large documents (>50 pages): Consider batching or splitting
When to Use This vs. Template Fill
| Use Word Document Create | Use Office Template Fill |
|---|---|
| Dynamic structure (variable sections) | Fixed structure (fill blanks) |
| Data-driven layouts | Pre-designed templates |
| Programmatic generation | Template-based |
| No template available | Have designed template |
| Content varies significantly | Same layout each time |
Limitations
What This Cannot Do
❌ Cannot use pre-designed templates (use/office-template-fill instead)❌ Cannot insert complex images or charts (can include simple images)
❌ Cannot apply advanced Word features (macros, ActiveX)
❌ Cannot create forms with input fields
❌ Cannot apply master page styles
Notes
- Documents are created in .docx format (Word 2007+)
- All styling is applied programmatically
- Complex layouts may require custom formatting code
- Generated documents open in any modern Word viewer
- No Word installation required to generate

