OfficeIMO

API Reference

Command

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

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