Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Save-OfficeAsciiDoc

Namespace PSWriteOffice
Inputs
OfficeIMO.AsciiDoc.AsciiDocDocument
Outputs
OfficeIMO.AsciiDoc.AsciiDocDocument

Saves an OfficeIMO AsciiDoc document.

Remarks

Saves an OfficeIMO AsciiDoc document.

Examples

Authored help example

Load, edit, and save an AsciiDoc document.

PS>


$document = Get-OfficeAsciiDoc -Path .\Guide.adoc
            $document | Save-OfficeAsciiDoc -Path .\Guide-normalized.adoc -Mode Canonical
        

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

Save-OfficeAsciiDoc -Document <AsciiDocDocument> [-LineEnding <LF|CRLF|CR>] [-Mode <Preserve|Canonical>] [-Options <AsciiDocWriterOptions>] [-PassThru] -Path <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Document AsciiDocDocument requiredposition: 0pipeline: True (ByValue)
AsciiDoc document to save.
LineEnding OfficeLineEnding optionalposition: namedpipeline: Falsevalues: 3
Canonical line ending: LF, CRLF, or CR. Omit it to retain the source preference.
Possible values: LF, CRLF, CR
Mode AsciiDocWriterMode optionalposition: namedpipeline: Falsevalues: 2
Writer mode. Preserve retains unchanged source; Canonical emits stable formatting.
Possible values: Preserve, Canonical
Options AsciiDocWriterOptions optionalposition: namedpipeline: False
Optional writer settings.
PassThru SwitchParameter optionalposition: namedpipeline: False
Return the saved document.
Path String requiredposition: 1pipeline: False
Destination path.

Outputs

OfficeIMO.AsciiDoc.AsciiDocDocument