API Reference
Command
ConvertFrom-OfficeWordMarkdown
Creates a Word document from Markdown.
Remarks
Creates a Word document from Markdown.
Examples
Create a .docx from Markdown text.
PS>ConvertFrom-OfficeWordMarkdown -Markdown '# Hello' -OutputPath .\hello.docx
Writes a Word document containing the supplied Markdown.
Pipe a Markdown document into Word conversion.
PS>Get-OfficeMarkdown -Path .\README.md | ConvertFrom-OfficeWordMarkdown
Returns a Word document instance for further edits.
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.
Syntax
ConvertFrom-OfficeWordMarkdown [-AllowedImageDirectory <String[]>] [-AllowLocalImages] [-AllowRemoteImages] [-BaseUri <String>] [-FitImagesToContextWidth] [-FitImagesToPageContentWidth] [-FontFamily <String>] -Markdown <String> [-MaxImageHeightPixels <Nullable`1>] [-MaxImageWidthPercentOfContent <Nullable`1>] [-MaxImageWidthPixels <Nullable`1>] [-Open] [-OutputPath <String>] [-PassThru] [-ReaderOptions <MarkdownReaderOptions>] [<CommonParameters>]#Parameter set:
MarkdownParameters
- AllowedImageDirectory String[]
- Restrict local images to one or more directories.
- AllowLocalImages SwitchParameter
- Allow local Markdown images to be inserted into the document.
- AllowRemoteImages SwitchParameter
- Allow remote HTTP(S) images to be downloaded and inserted.
- BaseUri String
- Base URI used to resolve relative links and images.
- FitImagesToContextWidth SwitchParameter
- Fit Markdown images to the current content context width.
- FitImagesToPageContentWidth SwitchParameter
- Fit Markdown images to the page content width.
- FontFamily String
- Optional font family applied during conversion.
- Markdown String
- Markdown text to convert.
- MaxImageHeightPixels Nullable`1
- Optional hard cap for Markdown image height in pixels.
- MaxImageWidthPercentOfContent Nullable`1
- Optional hard cap for Markdown image width as a percentage of available content width.
- MaxImageWidthPixels Nullable`1
- Optional hard cap for Markdown image width in pixels.
- Open SwitchParameter
- Open the document after saving.
- OutputPath String
- Optional output path for the .docx file.
- PassThru SwitchParameter
- Emit a FileInfo when saving to disk.
- ReaderOptions MarkdownReaderOptions
- Optional Markdown reader options used before Word conversion.
Outputs
OfficeIMO.Word.WordDocument System.IO.FileInfo
ConvertFrom-OfficeWordMarkdown [-AllowedImageDirectory <String[]>] [-AllowLocalImages] [-AllowRemoteImages] [-BaseUri <String>] -FilePath <String> [-FitImagesToContextWidth] [-FitImagesToPageContentWidth] [-FontFamily <String>] [-MaxImageHeightPixels <Nullable`1>] [-MaxImageWidthPercentOfContent <Nullable`1>] [-MaxImageWidthPixels <Nullable`1>] [-Open] [-OutputPath <String>] [-PassThru] [-ReaderOptions <MarkdownReaderOptions>] [<CommonParameters>]#Parameter set:
PathParameters
- AllowedImageDirectory String[]
- Restrict local images to one or more directories.
- AllowLocalImages SwitchParameter
- Allow local Markdown images to be inserted into the document.
- AllowRemoteImages SwitchParameter
- Allow remote HTTP(S) images to be downloaded and inserted.
- BaseUri String
- Base URI used to resolve relative links and images.
- FilePath String
- Path to a Markdown file.
- FitImagesToContextWidth SwitchParameter
- Fit Markdown images to the current content context width.
- FitImagesToPageContentWidth SwitchParameter
- Fit Markdown images to the page content width.
- FontFamily String
- Optional font family applied during conversion.
- MaxImageHeightPixels Nullable`1
- Optional hard cap for Markdown image height in pixels.
- MaxImageWidthPercentOfContent Nullable`1
- Optional hard cap for Markdown image width as a percentage of available content width.
- MaxImageWidthPixels Nullable`1
- Optional hard cap for Markdown image width in pixels.
- Open SwitchParameter
- Open the document after saving.
- OutputPath String
- Optional output path for the .docx file.
- PassThru SwitchParameter
- Emit a FileInfo when saving to disk.
- ReaderOptions MarkdownReaderOptions
- Optional Markdown reader options used before Word conversion.
Outputs
OfficeIMO.Word.WordDocument System.IO.FileInfo
ConvertFrom-OfficeWordMarkdown [-AllowedImageDirectory <String[]>] [-AllowLocalImages] [-AllowRemoteImages] [-BaseUri <String>] -Document <MarkdownDoc> [-FitImagesToContextWidth] [-FitImagesToPageContentWidth] [-FontFamily <String>] [-MaxImageHeightPixels <Nullable`1>] [-MaxImageWidthPercentOfContent <Nullable`1>] [-MaxImageWidthPixels <Nullable`1>] [-Open] [-OutputPath <String>] [-PassThru] [-ReaderOptions <MarkdownReaderOptions>] [<CommonParameters>]#Parameter set:
DocumentParameters
- AllowedImageDirectory String[]
- Restrict local images to one or more directories.
- AllowLocalImages SwitchParameter
- Allow local Markdown images to be inserted into the document.
- AllowRemoteImages SwitchParameter
- Allow remote HTTP(S) images to be downloaded and inserted.
- BaseUri String
- Base URI used to resolve relative links and images.
- Document MarkdownDoc
- Markdown document instance to convert.
- FitImagesToContextWidth SwitchParameter
- Fit Markdown images to the current content context width.
- FitImagesToPageContentWidth SwitchParameter
- Fit Markdown images to the page content width.
- FontFamily String
- Optional font family applied during conversion.
- MaxImageHeightPixels Nullable`1
- Optional hard cap for Markdown image height in pixels.
- MaxImageWidthPercentOfContent Nullable`1
- Optional hard cap for Markdown image width as a percentage of available content width.
- MaxImageWidthPixels Nullable`1
- Optional hard cap for Markdown image width in pixels.
- Open SwitchParameter
- Open the document after saving.
- OutputPath String
- Optional output path for the .docx file.
- PassThru SwitchParameter
- Emit a FileInfo when saving to disk.
- ReaderOptions MarkdownReaderOptions
- Optional Markdown reader options used before Word conversion.
Outputs
OfficeIMO.Word.WordDocument System.IO.FileInfo