API Reference
Cmdlet
Save-OfficeWord
Saves a Word document without disposing it.
Remarks
Use Close-OfficeWord -Save when you want to save and dispose the document.
Examples
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 SetsParameters
- Document WordDocument
- Document to save.
- PassThru SwitchParameter
- Emit the document object for further processing.
- Password String
- Password used to save the document as an encrypted package.
- Path String
- Optional save-as path.
- PdfAllowSystemFontEmbedding SwitchParameter
- Allow the native Word PDF converter to embed installed system fonts used by the document.
- PdfFontFamily String
- Optional default font family used by the native Word PDF converter.
- PdfPath String
- Optional PDF path to create from the same Word document.
- Show SwitchParameter
- Open the document after saving.
Outputs
OfficeIMO.Word.WordDocument