Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Save-OfficeAsciiDoc

Module
PSWriteOffice
Inputs
OfficeIMO.AsciiDoc.AsciiDocDocument
Outputs
OfficeIMO.AsciiDoc.AsciiDocDocument

Saves an OfficeIMO AsciiDoc document.

Syntax

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

Examples

Load, edit, and save an AsciiDoc document.

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

Parameters

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

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.