API Reference

Cmdlet

Save-OfficeWord

Namespace PSWriteOffice
Inputs
OfficeIMO.Word.WordDocument
Outputs
OfficeIMO.Word.WordDocument

Saves a Word document without disposing it.

Remarks

Use Close-OfficeWord -Save when you want to save and dispose the document.

Examples

Authored help example

Example 1: Save the open document.

PS>


$doc | Save-OfficeWord
        

Persists pending changes and keeps the document open.

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-OfficeWord -Document <WordDocument> [-PassThru] [-Password <String>] [-Path <String>] [-PdfAllowSystemFontEmbedding] [-PdfFontFamily <String>] [-PdfPath <String>] [-Show] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Document WordDocument requiredposition: 0pipeline: True (ByValue)
Document to save.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the document object for further processing.
Password String optionalposition: namedpipeline: False
Password used to save the document as an encrypted package.
Path String optionalposition: namedpipeline: Falsealiases: FilePath
Optional save-as path.
PdfAllowSystemFontEmbedding SwitchParameter optionalposition: namedpipeline: Falsealiases: AllowSystemFontEmbedding
Allow the native Word PDF converter to embed installed system fonts used by the document.
PdfFontFamily String optionalposition: namedpipeline: False
Optional default font family used by the native Word PDF converter.
PdfPath String optionalposition: namedpipeline: False
Optional PDF path to create from the same Word document.
Show SwitchParameter optionalposition: namedpipeline: False
Open the document after saving.

Outputs

OfficeIMO.Word.WordDocument