Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Open-OfficeMarkdown

Module
PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Markdown.MarkdownDocument System.IO.FileInfo

Opens native Markdown from a file or parses text; a file content block saves atomically.

Syntax

Open-OfficeMarkdown
[-AllowLoss]
[[-Content] <ScriptBlock>]
[-Options <Object[]>]
[-PassThru]
[-Path] <String>
[-Show]
[-WriteOptions <MarkdownSaveOptions>]
[<CommonParameters>]
#
Parameter set: Path
Open-OfficeMarkdown
[-AllowLoss]
[[-Content] <ScriptBlock>]
-LiteralPath <String>
[-Options <Object[]>]
[-PassThru]
[-Show]
[-WriteOptions <MarkdownSaveOptions>]
[<CommonParameters>]
#
Parameter set: LiteralPath
Open-OfficeMarkdown
[-AllowLoss]
[[-Content] <ScriptBlock>]
[-Options <Object[]>]
[-PassThru]
[-Show]
-Text <String>
[<CommonParameters>]
#
Parameter set: Text

Examples

Open a literal path from a file pipeline.

$document = Get-Item -LiteralPath './Review[final].md' | Open-OfficeMarkdown

Parse text with bounded reader options.

Open-OfficeMarkdown -Text '# Report' -Options (New-OfficeMarkdownReaderOptions -MaxInputCharacters 500000)

Parameters

-AllowLoss SwitchParameter optional
Gets or sets whether native-save loss is explicitly accepted.
-Content ScriptBlock optionalposition: 1
Gets or sets a content block; omission returns the live document.
-Options Object[] optional
Native reader options followed by optional native-property hashtable overrides.
-PassThru SwitchParameter optional
Gets or sets whether a completed content block returns the saved FileInfo.
-Path String requiredposition: 0pipeline: True (ByValue)sets: Path
Markdown source with FileSystem wildcard expansion.
-Show SwitchParameter optional
Gets or sets whether the saved file opens in the system default application.
-WriteOptions MarkdownSaveOptions optionalsets: Path, LiteralPath
Native settings used when saving a file content block.
-LiteralPath String requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Literal source path, including FileInfo.FullName and provider PSPath.
-Text String requiredsets: Text
Markdown to parse without a file or authoring block.

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.