Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

API Reference

Cmdlet

Add-OfficeWordContentControl

Namespace PSWriteOffice
Inputs
OfficeIMO.Word.WordParagraph
Outputs
OfficeIMO.Word.WordStructuredDocumentTag

Adds a structured content control to the current paragraph.

Remarks

Adds a structured content control to the current paragraph.

Examples

Authored help example

Add a content control with text.

PS>


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

Creates a content control with the specified text.

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

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

Parameters

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

Outputs

OfficeIMO.Word.WordStructuredDocumentTag