Cmdlet
Get-OfficeWordContentControl
Gets structured content controls from a Word document.
Syntax
Examples
Inventory content controls by tag.
$controls = Get-OfficeWordContentControl -Path .\Template.docx -Tag 'report-*'
$controls |
Group-Object -Property Tag |
Select-Object -Property Name, CountReturns structured document tags matching the template tag convention and summarizes their counts.
Parameters
- -Alias String[]
- Filter by content control alias (wildcards supported).
- -Path String
- Path to the .docx file.
- -Tag String[]
- Filter by content control tag (wildcards supported).
- -Text String[]
- Filter by content control text (wildcards supported).
- -Document WordDocument
- Word document to read.
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.