Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeWordContentControl

Module
PSWriteOffice
Inputs
OfficeIMO.Word.WordDocument System.String[]
Outputs
OfficeIMO.Word.WordStructuredDocumentTag OfficeIMO.Word.WordCheckBox OfficeIMO.Word.WordComboBox OfficeIMO.Word.WordDatePicker OfficeIMO.Word.WordDropDownList OfficeIMO.Word.WordPictureControl OfficeIMO.Word.WordRepeatingSection

Gets typed native content controls filtered by family, alias, tag, rendered text or checkbox state.

Syntax

Get-OfficeWordContentControl
[-Alias <String[]>]
[-Document <WordDocument>]
[-State <Checked|Unchecked>]
[-Tag <String[]>]
[-Text <String[]>]
[-Type <WordContentControlType[]>]
[<CommonParameters>]
#
Parameter set: Document
Get-OfficeWordContentControl
[-Alias <String[]>]
[-Path] <String[]>
[-State <Checked|Unchecked>]
[-Tag <String[]>]
[-Text <String[]>]
[-Type <WordContentControlType[]>]
[<CommonParameters>]
#
Parameter set: Path
Get-OfficeWordContentControl
[-Alias <String[]>]
-LiteralPath <String[]>
[-State <Checked|Unchecked>]
[-Tag <String[]>]
[-Text <String[]>]
[-Type <WordContentControlType[]>]
[<CommonParameters>]
#
Parameter set: LiteralPath

Examples

Example 1

Get-OfficeWordContentControl -Alias @('Value')

Example 2

Get-OfficeWordContentControl -LiteralPath @('C:\Path')

Example 3

Get-OfficeWordContentControl -Path @('C:\Path')

Parameters

-Alias String[] optional
Wildcard control aliases.
-Document WordDocument optionalpipeline: True (ByValue)sets: Document
Caller-owned document; omission reads the enclosing Word document.
-State WordCheckBoxState optional
Checked or unchecked; implies the checkbox family.
Possible values: Checked, Unchecked
-Tag String[] optional
Wildcard control tags.
-Text String[] optional
Wildcard native rendered text.
-Type WordContentControlType[] optional
Control families; omission includes all seven native families.
Possible values: Text, CheckBox, ComboBox, DatePicker, DropDownList, Picture, RepeatingSection
-Path String[] requiredposition: 0pipeline: True (ByValue)sets: Path
Word files with FileSystem wildcard expansion.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Literal Word files, including FileInfo.FullName.

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.