# Migrate from PSWriteWord to PSWriteOffice

Migrate from PSWriteWord to PSWriteOffice 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**750**

Forks**87**

Open issues**5**

PowerShell Gallery downloads**5497709**

Release**v3.6.2**

Language: C# Updated: 2026-11-28

Documentation

Replace archived PSWriteWord scripts with maintained PSWriteOffice Word commands for DOCX creation, editing, review, merge, and conversion.

[PSWriteWord](https://github.com/EvotecIT/PSWriteWord) is archived and replaced by PSWriteOffice. New development should use the `OfficeWord` command family, which runs on the current OfficeIMO.Word engine without requiring Microsoft Word.

PSWriteOffice is not a drop-in namespace change. PSWriteWord exposed Xceed-era objects and the Documentimo DSL; PSWriteOffice uses OfficeIMO objects and a scoped document DSL. Rewrite the composition block and validate templates, styles, fields, headers, footers, and pagination with representative documents.

## Common command replacements

| PSWriteWord | PSWriteOffice | Migration note |
| --- | --- | --- |
| `New-WordDocument` | `New-OfficeWord` | Prefer the script-block DSL when creating a complete document. |
| `Get-WordDocument` | `Get-OfficeWord` | Use targeted `Get-OfficeWord*` commands to inspect content. |
| `Add-WordParagraph`, `Add-WordText` | `Add-OfficeWordParagraph`, `Add-OfficeWordText` | Text runs can be added inside an active paragraph context. |
| `Add-WordTable` | `Add-OfficeWordTable` | Pass objects with `-InputObject`; map old design names to current table styles. |
| `Add-WordPicture` | `Add-OfficeWordImage` | Recheck sizing, wrapping, and placement. |
| `Add-WordHeader`, `Add-WordFooter` | `Add-OfficeWordHeader`, `Add-OfficeWordFooter` | Configure them inside the appropriate section. |
| `Add-WordList` | `Add-OfficeWordList` | Nested list behavior should be verified against the generated DOCX. |
| `Add-WordTOC` | `Add-OfficeWordTableOfContents` | Use update commands when fields or headings change. |
| `Merge-WordDocument` | `Join-OfficeWordDocument` | Supply a base input and one or more append paths. |
| `Save-WordDocument` | `Save-OfficeWord` | `New-OfficeWord` saves automatically unless `-NoSave` is used. |
| `Documentimo`, `DocText`, `DocTable` | `New-OfficeWord` with `Add-OfficeWord*` commands | Rewrite the old DSL; aliases are available for interactive use, but canonical names are clearer in maintained scripts. |

## Before: PSWriteWord

```powershell
$document = New-WordDocument -FilePath '.\Output\Status.docx'
Add-WordText -WordDocument $document -Text 'Service status'
Add-WordTable -WordDocument $document -DataTable $services
Save-WordDocument -WordDocument $document
```

## After: PSWriteOffice

```powershell
$services = Get-Service |
    Select-Object -First 10 Name, Status

New-OfficeWord -Path '.\Output\Status.docx' {
    Add-OfficeWordSection {
        Add-OfficeWordParagraph -Text 'Service status' -Style Heading1
        Add-OfficeWordTable -InputObject $services -Style 'GridTable1LightAccent2'
    }
}
```

For an existing file, load it with `Get-OfficeWord`, make targeted changes, and pipe the returned document to `Save-OfficeWord`. Use `Compare-OfficeWordDocument` when the migration needs machine-readable evidence of document changes.

## Validate before replacing the old job

- compare page setup, section breaks, styles, lists, tables, images, and headers or footers;
- check fields and table-of-contents updates in the target Word viewer;
- verify password protection and template behavior explicitly;
- test charts, equations, content controls, comments, revisions, and mail merge when the old workflow used them.

See [Word automation](/projects/pswriteoffice/docs/word/) and the generated [PowerShell command reference](/projects/pswriteoffice/api/) for current syntax.

<!-- PowerForge markdown artifact sha256:531020B2CE6F987B8ABFDEEA3DFC6B215A7FED7E30C6688E0DCE5EA980491C06 -->
