Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeWordContentControl

Aliases: WordContentControl
Module
PSWriteOffice
Aliases
WordContentControl
Inputs
OfficeIMO.Word.WordParagraph
Outputs
OfficeIMO.Word.WordStructuredDocumentTag

Adds a structured content control to the current paragraph.

Syntax

Add-OfficeWordContentControl
[-Alias <String>]
[-Paragraph <WordParagraph>]
[-PassThru]
[-Tag <String>]
[[-Text] <String>]
[<CommonParameters>]
#
Parameter set: Default

Examples

Add a content control with text.

Add-OfficeWordParagraph { Add-OfficeWordContentControl -Text 'Client' -Alias 'ClientName' }

Creates a content control with the specified text.

Parameters

-Alias String optional
Optional alias for the control.
-Paragraph WordParagraph optionalpipeline: True (ByValue)
Explicit paragraph to receive the control.
-PassThru SwitchParameter optional
Emit the created control.
-Tag String optional
Optional tag for the control.
-Text String optionalposition: 0
Initial text for the control.

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.