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-OfficeWord

Module
PSWriteOffice
Inputs
OfficeIMO.Word.WordDocument
Outputs
OfficeIMO.Word.WordDocument

Saves a Word document without disposing it.

Syntax

Save-OfficeWord
[-Document] <WordDocument>
[-Open]
[-PassThru]
[-Password <String>]
[-Path <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

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

Examples

Save the open document.

$doc | Save-OfficeWord

Persists pending changes and keeps the document open.

Parameters

-Document WordDocument requiredposition: 0pipeline: True (ByValue)
Document to save.
-Open SwitchParameter optionalaliases: Show
Open the document after saving.
-PassThru SwitchParameter optional
Emit the document object for further processing.
-Password String optional
Password used to save the document as an encrypted package.
-Path String optionalaliases: FilePath
Optional save-as 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.