# ConvertFrom-OfficeWordMarkdown

Creates a Word document from Markdown. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

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/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: ConvertFrom-WordMarkdown

**Module**

`PSWriteOffice`

**Aliases**

`ConvertFrom-WordMarkdown`

**Inputs**

`OfficeIMO.Markdown.MarkdownDoc` `System.String`

**Outputs**

`OfficeIMO.Word.WordDocument` `System.IO.FileInfo`

**Source**

[ConvertFromOfficeWordMarkdownCommand.cs:39](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/ConvertFromOfficeWordMarkdownCommand.cs#L39) 

Creates a Word document from Markdown.

## Syntax

```
ConvertFrom-OfficeWordMarkdown
[-AllowDataUriImages <Boolean>]
[-AllowedImageDirectory <String[]>]
[-AllowLocalImages]
[-AllowRemoteImages]
[-BaseUri <String>]
[-BookmarkName <String>]
[-ContentControlAlias <String>]
[-ContentControlTag <String>]
[-FitImagesToContextWidth]
[-FitImagesToPageContentWidth]
[-FontFamily <String>]
[-KeepPlaceholder]
[-Markdown] <String>
[-MaxDataUriImageBytes <Int64>]
[-MaxImageHeightPixels <Double>]
[-MaxImageWidthPercentOfContent <Double>]
[-MaxImageWidthPixels <Double>]
[-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>]
[-Open]
[-OutputPath <String>]
[-PassThru]
[-PreferNarrativeSingleLineDefinitions]
[-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>]
[-ReaderOptions <MarkdownReaderOptions>]
[-RenderFrontMatter]
[-TemplatePath <String>]
[-Theme <OfficeVisualThemeKind>]
[<CommonParameters>]
```

[#](#member-6be8dde99d20619e24203561)

Parameter set: `Markdown`

```
ConvertFrom-OfficeWordMarkdown
[-AllowDataUriImages <Boolean>]
[-AllowedImageDirectory <String[]>]
[-AllowLocalImages]
[-AllowRemoteImages]
[-BaseUri <String>]
[-BookmarkName <String>]
[-ContentControlAlias <String>]
[-ContentControlTag <String>]
[-FitImagesToContextWidth]
[-FitImagesToPageContentWidth]
[-FontFamily <String>]
[-KeepPlaceholder]
[-MaxDataUriImageBytes <Int64>]
[-MaxImageHeightPixels <Double>]
[-MaxImageWidthPercentOfContent <Double>]
[-MaxImageWidthPixels <Double>]
[-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>]
[-Open]
[-OutputPath <String>]
[-PassThru]
[-Path] <String>
[-PreferNarrativeSingleLineDefinitions]
[-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>]
[-ReaderOptions <MarkdownReaderOptions>]
[-RenderFrontMatter]
[-TemplatePath <String>]
[-Theme <OfficeVisualThemeKind>]
[<CommonParameters>]
```

[#](#member-e041d2df469738b9cf57b3c3)

Parameter set: `Path`

```
ConvertFrom-OfficeWordMarkdown
[-AllowDataUriImages <Boolean>]
[-AllowedImageDirectory <String[]>]
[-AllowLocalImages]
[-AllowRemoteImages]
[-BaseUri <String>]
[-BookmarkName <String>]
[-ContentControlAlias <String>]
[-ContentControlTag <String>]
-Document <MarkdownDoc>
[-FitImagesToContextWidth]
[-FitImagesToPageContentWidth]
[-FontFamily <String>]
[-KeepPlaceholder]
[-MaxDataUriImageBytes <Int64>]
[-MaxImageHeightPixels <Double>]
[-MaxImageWidthPercentOfContent <Double>]
[-MaxImageWidthPixels <Double>]
[-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>]
[-Open]
[-OutputPath <String>]
[-PassThru]
[-PreferNarrativeSingleLineDefinitions]
[-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>]
[-ReaderOptions <MarkdownReaderOptions>]
[-RenderFrontMatter]
[-TemplatePath <String>]
[-Theme <OfficeVisualThemeKind>]
[<CommonParameters>]
```

[#](#member-b02f2a818f6092f41b3bfd39)

Parameter set: `Document`

## Description

Returns a WordDocument or saves it to disk when -OutputPath is provided.

## Examples

### Create a .docx from Markdown text.

```powershell
ConvertFrom-OfficeWordMarkdown -Markdown '# Hello' -OutputPath .\hello.docx
```

Writes a Word document containing the supplied Markdown.

### Pipe a Markdown document into Word conversion.

```powershell
Get-OfficeMarkdown -Path .\README.md | ConvertFrom-OfficeWordMarkdown
```

Returns a Word document instance for further edits.

### Insert Markdown into a Word template bookmark.

```powershell
ConvertFrom-OfficeWordMarkdown -Path .\SOP.md -TemplatePath .\Template.docx -BookmarkName MainContent -OutputPath .\SOP.docx
```

Copies the template and replaces the bookmark paragraph with generated Markdown content.

## Parameters

**-AllowDataUriImages Boolean optional**

Allow data URI Markdown images to be embedded in Word output.

**-AllowedImageDirectory String[] optional**

Restrict local images to one or more directories.

**-AllowLocalImages SwitchParameter optional**

Allow local Markdown images to be inserted into the document.

**-AllowRemoteImages SwitchParameter optional**

Allow remote HTTP(S) images to be downloaded and inserted.

**-BaseUri String optionalaliases: BasePath**

Base URI used to resolve relative links and images.

**-BookmarkName String optional**

Bookmark name that marks where Markdown content should be inserted in the template.

**-ContentControlAlias String optional**

Block content control alias that marks where Markdown content should be inserted in the template.

**-ContentControlTag String optional**

Block content control tag that marks where Markdown content should be inserted in the template.

**-FitImagesToContextWidth SwitchParameter optional**

Fit Markdown images to the current content context width.

**-FitImagesToPageContentWidth SwitchParameter optional**

Fit Markdown images to the page content width.

**-FontFamily String optional**

Optional font family applied during conversion.

**-KeepPlaceholder SwitchParameter optional**

Keep the target bookmark or content-control placeholder after inserting Markdown content.

**-Markdown String requiredposition: 0pipeline: True (ByValue)sets: Markdown**

Markdown text to convert.

**-MaxDataUriImageBytes Int64 optional**

Maximum decoded size for one data URI image.

**-MaxImageHeightPixels Double optional**

Optional hard cap for Markdown image height in pixels.

**-MaxImageWidthPercentOfContent Double optional**

Optional hard cap for Markdown image width as a percentage of available content width.

**-MaxImageWidthPixels Double optional**

Optional hard cap for Markdown image width in pixels.

**-NormalizeInput MarkdownInputNormalizationPreset optional**

Applies a built-in Markdown input normalization preset before parsing.

Possible values: `IntelligenceXTranscript`, `IntelligenceXTranscriptStrict`, `DocsLoose`

**-Open SwitchParameter optional**

Open the document after saving.

**-OutputPath String optionalaliases: OutPath**

Optional output path for the .docx file.

**-PassThru SwitchParameter optional**

Emit a FileInfo when saving to disk.

**-PreferNarrativeSingleLineDefinitions SwitchParameter optional**

Prefer narrative paragraphs for isolated single-line definition-list patterns.

**-Profile MarkdownDialectProfile optional**

Named Markdown reader profile used when ReaderOptions is not supplied.

Possible values: `OfficeIMO`, `CommonMark`, `GitHubFlavoredMarkdown`, `Portable`

**-ReaderOptions MarkdownReaderOptions optional**

Optional Markdown reader options used before Word conversion.

**-RenderFrontMatter SwitchParameter optional**

Render YAML front matter as visible Word content. Template conversions hide front matter by default.

**-TemplatePath String optionalaliases: Template**

Optional Word template document to copy before inserting Markdown content.

**-Theme OfficeVisualThemeKind optional**

Shared Markdown visual theme for generated Word output.

Possible values: `Plain`, `WordLike`, `TechnicalDocument`, `GitHubLike`, `Compact`, `Report`

**-Path String requiredposition: 0aliases: FilePathsets: Path**

Path to a Markdown file.

**-Document MarkdownDoc requiredpipeline: True (ByValue)sets: Document**

Markdown document instance to convert.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:5777FC79B86CD6CF1E81219D4222C4784DB2DC056CA71610C950206FEB47EBB2 -->
