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-OfficeWordParagraph

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

Adds a paragraph to the current section/header/footer context.

Remarks

Acts as the primary DSL container for inline content such as text runs, bold segments, and images.

Examples

Authored help example

Write a formatted sentence.

PS>


Add-OfficeWordParagraph { Add-OfficeWordText -Text 'Hello '; Add-OfficeWordText -Text 'World' -Bold }
        

Outputs “Hello World” with the second word bolded.

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-OfficeWordParagraph [-Alignment <Nullable`1>] [-PassThru] [-Style <Nullable`1>] [-Text <String>] [<CommonParameters>]
#
Parameter set: Text

Parameters

Alignment Nullable`1 optionalposition: namedpipeline: False
Paragraph justification.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the WordParagraph for further use.
Style Nullable`1 optionalposition: namedpipeline: False
Paragraph style.
Text String optionalposition: 0pipeline: False
Optional initial paragraph text.

Outputs

System.Object

Add-OfficeWordParagraph [-Alignment <Nullable`1>] [-Content <ScriptBlock>] [-PassThru] [-Style <Nullable`1>] [-Text <String>] [<CommonParameters>]
#
Parameter set: Content

Parameters

Alignment Nullable`1 optionalposition: namedpipeline: False
Paragraph justification.
Content ScriptBlock optionalposition: 0pipeline: False
Nested DSL content (runs, lists, images).
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the WordParagraph for further use.
Style Nullable`1 optionalposition: namedpipeline: False
Paragraph style.
Text String optionalposition: 0pipeline: False
Optional initial paragraph text.

Outputs

System.Object