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

Set-OfficeWordDocumentProperty

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

Sets a built-in or custom document property on a Word document.

Remarks

Sets a built-in or custom document property on a Word document.

Examples

Authored help example

Set the document title.

PS>


Set-OfficeWordDocumentProperty -Name Title -Value 'Quarterly Report'
        

Updates the built-in Title property on the active Word document.

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

Set-OfficeWordDocumentProperty [-Custom] [-Document <WordDocument>] -Name <String> [-PassThru] [-Value <Object>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Custom SwitchParameter optionalposition: namedpipeline: False
Treat the property as a custom document property.
Document WordDocument optionalposition: namedpipeline: True (ByValue)
Document to update when provided explicitly.
Name String requiredposition: 0pipeline: False
Property name to update.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document.
Value Object optionalposition: 1pipeline: False
Property value.

Outputs

OfficeIMO.Word.WordDocument