API Reference

Cmdlet

Get-OfficeWordDocumentProperty

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

Gets built-in and custom document properties from a Word document.

Remarks

Gets built-in and custom document properties from a Word document.

Examples

Authored help example

Example 1: Read release metadata from a document.

PS>


$properties = Get-OfficeWordDocumentProperty -Path .\Report.docx -Name Title, Subject, ReleaseStatus
            $properties |
                Select-Object -Property Name, Value, IsCustom |
                Format-Table -AutoSize
        

Returns selected built-in and custom properties for a document metadata check.

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

Get-OfficeWordDocumentProperty [-BuiltIn] [-Custom] -InputPath <String> [-Name <String[]>] [<CommonParameters>]
#
Parameter set: Path

Parameters

BuiltIn SwitchParameter optionalposition: namedpipeline: False
Only return built-in document properties.
Custom SwitchParameter optionalposition: namedpipeline: False
Only return custom document properties.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the document.
Name String[] optionalposition: namedpipeline: False
Property name filter (wildcards supported).

Outputs

PSWriteOffice.Models.Word.WordDocumentPropertyInfo: Represents a Word document property exposed to PowerShell.

Get-OfficeWordDocumentProperty [-BuiltIn] [-Custom] -Document <WordDocument> [-Name <String[]>] [<CommonParameters>]
#
Parameter set: Document

Parameters

BuiltIn SwitchParameter optionalposition: namedpipeline: False
Only return built-in document properties.
Custom SwitchParameter optionalposition: namedpipeline: False
Only return custom document properties.
Document WordDocument requiredposition: namedpipeline: True (ByValue)
Document to inspect.
Name String[] optionalposition: namedpipeline: False
Property name filter (wildcards supported).

Outputs

PSWriteOffice.Models.Word.WordDocumentPropertyInfo: Represents a Word document property exposed to PowerShell.