# Automate Word Documents

Automate Word Documents on Evotec with installation guidance, setup notes, reference details, and project documentation.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice)

Stars**722**

Forks**84**

Open issues**2**

PowerShell Gallery downloads**5205291**

Release**v3.6.2**

Language: C# Updated: 2026-11-22

Documentation

Create, inspect, update, review, merge, protect, and convert DOCX workflows from PowerShell. Includes examples and cmdlet links.

The Word family covers complete report creation and targeted updates to existing DOCX files. Its 93 exported commands include sections, paragraphs, text runs, lists, tables, images, charts, fields, links, headers and footers, notes, content controls, review, protection, merging, mail merge, and conversion.

## Build a report

Start with `New-OfficeWord`, add one or more sections, and compose content inside the active document context. Use canonical `Add-OfficeWord*` commands in shared or long-lived scripts; the shorter aliases are convenient for interactive DSL use.

```powershell
$rows = @(
    [pscustomobject]@{ Region = 'EMEA'; Revenue = 98000; Growth = '22%' }
    [pscustomobject]@{ Region = 'APAC'; Revenue = 143000; Growth = '18%' }
)

New-OfficeWord -Path '.\Output\Revenue.docx' {
    Add-OfficeWordSection {
        Add-OfficeWordParagraph -Text 'Revenue report' -Style Heading1
        Add-OfficeWordParagraph -Text 'Generated by a scheduled PowerShell job.'
        Add-OfficeWordTable -InputObject $rows -Style 'GridTable1LightAccent2'
    }
}
```

## Inspect and update

Use `Get-OfficeWord` to load a file and the targeted `Get-OfficeWord*` and `Find-OfficeWord*` commands to locate content. Word inspection includes paragraphs, text, tables and cells, sections, images, shapes, lists, fields, bookmarks, notes, links, document properties, statistics, content controls, reviews, and tables of contents.

Update commands are intentionally specific: change text, styles, images, shapes, page setup, document properties, fields, or table-of-contents state without rebuilding the whole document.

## Copy complete DSL recipes

- [Project status report](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Word/Recipe-Word-ProjectStatus.ps1): header and footer, executive summary, conditional milestone table, progress chart, check box, and date picker.
- [Change approval checklist](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Word/Recipe-Word-ApprovalChecklist.ps1): table of contents, risk selector, required-evidence table, approval controls, and watermark.
- [Executive service report](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Showcase/Showcase-Word-ExecutiveReport.ps1): the larger composition example with metadata, rich text, bookmarks, notes, tables, charts, and content controls.

## Other Word workflows

- [Object composition](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Word/Recipe-Word-ObjectComposition.ps1): hold a live document, add a paragraph and mixed-format runs, add a table, then save once.
- [HTML to Word](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Word/Recipe-Word-HtmlToDocument.ps1): turn an HTML fragment into an editable DOCX file.
- [Compare documents](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/Word/Recipe-Word-CompareDocuments.ps1): produce structured evidence about changes between two versions.
- [Inspect, update, merge, and mail merge](https://github.com/EvotecIT/PSWriteOffice/blob/main/Examples/README.md#read-modify-combine-and-convert): work with documents supplied by another system.

The [DSL cookbook](/projects/pswriteoffice/docs/dsl-cookbook/) explains how the scoped commands fit together and how to reuse the same input objects across formats.

## Task guides

- [Read and inspect existing documents](/projects/pswriteoffice/docs/word-read-inspect/)
- [Update existing documents](/projects/pswriteoffice/docs/word-update-existing/)
- [Merge documents and generate letters](/projects/pswriteoffice/docs/word-merge-mailmerge/)
- [Review, protect, and deliver](/projects/pswriteoffice/docs/word-review-delivery/)

## Workflow capabilities

- **Templates and data:** mail merge, table conditions, calculated columns, document properties, fields, and reusable content blocks.
- **Review:** comments and revision inspection through `Get-OfficeWordReview`, plus bounded resolution with `Resolve-OfficeWordRevision`.
- **Forms:** check boxes, combo boxes, date pickers, drop-down lists, picture controls, repeating sections, and general content controls.
- **Delivery:** merge documents, protect output, update fields and tables of contents, and convert to HTML or Markdown.

For exact syntax, search the [PowerShell command reference](/projects/pswriteoffice/api/) for `OfficeWord`. See the [Word examples](https://github.com/EvotecIT/PSWriteOffice/tree/main/Examples/Word) for complete copyable scripts.

<!-- PowerForge markdown artifact sha256:5D976B3168081945B09C3683EFDB5746591711C2943DB2866EFA1AB1A573DF68 -->
