# Add-OfficeWordParagraph

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

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **4**

Total downloads **5,250,223**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: WordParagraph

**Module**

`PSWriteOffice`

**Aliases**

`WordParagraph`

**Inputs**

`System.Object`

**Outputs**

`OfficeIMO.Word.WordParagraph`

**Source**

[AddOfficeWordParagraphCommand.cs:31](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/AddOfficeWordParagraphCommand.cs#L31) 

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

## Syntax

```
Add-OfficeWordParagraph
[-Alignment <WordParagraphAlignment>]
[-PassThru]
[-Run <Object[]>]
[-Style <WordParagraphStyles>]
[-StyleId <String>]
[-Target <Object>]
[[-Text] <String>]
[<CommonParameters>]
```

[#](#method-add-officewordparagraph-wordparagraphalignment-switchparameter-object-wordparagraphstyles-string-object-string)

Parameter set: `Text`

```
Add-OfficeWordParagraph
[-Alignment <WordParagraphAlignment>]
[[-Content] <ScriptBlock>]
[-PassThru]
[-Style <WordParagraphStyles>]
[-StyleId <String>]
[-Target <Object>]
[[-Text] <String>]
[<CommonParameters>]
```

[#](#method-add-officewordparagraph-wordparagraphalignment-scriptblock-switchparameter-wordparagraphstyles-string-object-string)

Parameter set: `Content`

## Description

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

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Create a Word report](/projects/pswriteoffice/examples/create-word-report/) Example
  
  A curated example for generating a Word document from PowerShell.

## Examples

### Write a formatted sentence.

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

Outputs “Hello World” with the second word bolded.

### Apply a paragraph style by id.

```powershell
WordParagraph -Text 'Executive summary' -StyleId 'ReportHeading'
```

Applies a paragraph style id, including custom styles already present in a template document.

### Add mixed-format text through explicit objects.

```powershell
$paragraph = $document | Add-OfficeWordParagraph -PassThru
$paragraph | Add-OfficeWordText -Run @{ Text = 'Owner: ', 'Platform'; Bold = $true, $false }
```

Creates a paragraph on a live document and appends two differently formatted runs.

## Parameters

**-Alignment WordParagraphAlignment optional**

Paragraph justification.

Possible values: `Left`, `Start`, `Center`, `Right`, `End`, `Both`, `MediumKashida`, `Distribute`, `NumTab`, `HighKashida`, `LowKashida`, `ThaiDistribute`

**-PassThru SwitchParameter optional**

Emit the WordParagraph for further use.

**-Run Object[] optionalaliases: Runssets: Text**

Rich text runs. Each run can be created with TextRun/WordTextRun or provided as a hashtable/object.

**-Style WordParagraphStyles optional**

Paragraph style.

Possible values: `Normal`, `Heading1`, `Heading2`, `Heading3`, `Heading4`, `Heading5`, `Heading6`, `Heading7`, `Heading8`, `Heading9`, `ListParagraph`, `Custom`

**-StyleId String optional**

Paragraph style id, including custom style ids from a template document.

**-Target Object optionalpipeline: True (ByValue)aliases: Document, Section**

Document or section that will receive the paragraph.

**-Text String optionalposition: 0**

Optional initial paragraph text.

**-Content ScriptBlock optionalposition: 0sets: Content**

Nested DSL content (runs, lists, images).

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:C0703E03C9557D1D9D2021522FCD3B3F4755FE68BF4B2D0ADF4A344AD5B2F19F -->
