Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

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

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] [-Path <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.
Path String optionalposition: namedpipeline: False
Optional save-as path.
Show SwitchParameter optionalposition: namedpipeline: False
Open the document after saving.

Outputs

OfficeIMO.Word.WordDocument