Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars158
Forks14
Open issues0
PowerShell Gallery downloads158661
Releasev3.0.5
Language: C# Updated: 2026-08-20T06:15:04.0000000+00:00

Documentation

Convert Between Markdown and Word

Create reviewable Word documents from Markdown and return DOCX content to Markdown with explicit image and formatting policies.

A Markdown-to-Word workflow is useful when authors prefer text-based source control but reviewers need comments, tracked changes, or a familiar DOCX file. The return conversion is best treated as semantic round-trip, not pixel-perfect fidelity.

Create the review copy

ConvertFrom-OfficeWordMarkdown accepts Markdown text, a file path, or a parsed Markdown document. It can use a template, target a bookmark or content control, render front matter, and control local, remote, and data-URI images.

Return to Markdown

ConvertTo-OfficeWordMarkdown converts a Word path or loaded document to Markdown. Image export mode and image directory determine whether embedded images become sidecar files. Underline and highlight output are opt-in because not every Markdown target represents them consistently.

The Word round-trip recipe creates Markdown, converts it to DOCX, and converts the Word file back to Markdown.

For heavily designed Word templates, define which semantic elements must survive before promising a round-trip. Tables, headings, lists, links, and basic emphasis are a better contract than exact pagination.