# Set-OfficeWordParagraphStyle

Updates paragraph style, spacing, indentation, and pagination hints.

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 **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: WordParagraphStyle

**Module**

`PSWriteOffice`

**Aliases**

`WordParagraphStyle`

**Inputs**

`OfficeIMO.Word.WordParagraph`

**Outputs**

`OfficeIMO.Word.WordParagraph`

**Source**

[SetOfficeWordParagraphStyleCommand.cs:19](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/SetOfficeWordParagraphStyleCommand.cs#L19) 

Updates paragraph style, spacing, indentation, and pagination hints.

## Syntax

```
Set-OfficeWordParagraphStyle
[-Alignment <WordParagraphAlignment>]
[-AvoidWidowAndOrphan <Boolean>]
[-BiDi <Boolean>]
[-CharacterAlignment <Top|Center|Baseline|Bottom|Auto>]
[-IndentationAfterPoints <Double>]
[-IndentationBeforePoints <Double>]
[-IndentationFirstLinePoints <Double>]
[-IndentationHangingPoints <Double>]
[-KeepLinesTogether <Boolean>]
[-KeepWithNext <Boolean>]
[-LineSpacingPoints <Double>]
[-LineSpacingRule <Auto|Exact|AtLeast>]
[-PageBreakBefore <Boolean>]
[[-Paragraph] <WordParagraph>]
[-PassThru]
[-SpacingAfterPoints <Double>]
[-SpacingBeforePoints <Double>]
[-Style <WordParagraphStyles>]
[-StyleId <String>]
[-TextDirection <WordTextDirection>]
[<CommonParameters>]
```

[#](#member-e3a981b33b7b360903287121)

Parameter set: `All Parameter Sets`

## Examples

### Style a paragraph in a Word DSL.

```powershell
$p = Add-OfficeWordParagraph -Text 'Executive Summary' -PassThru; $p | Set-OfficeWordParagraphStyle -Style Heading1 -KeepWithNext $true
```

Applies a heading style and keeps it with the next paragraph.

## Parameters

**-Alignment WordParagraphAlignment optional**

Paragraph alignment.

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

**-AvoidWidowAndOrphan Boolean optional**

Enable widow and orphan control.

**-BiDi Boolean optional**

Set or clear right-to-left paragraph layout.

**-CharacterAlignment WordVerticalCharacterAlignment optional**

Vertical character alignment on each line.

Possible values: `Top`, `Center`, `Baseline`, `Bottom`, `Auto`

**-IndentationAfterPoints Double optional**

Indentation after the paragraph in points.

**-IndentationBeforePoints Double optional**

Indentation before the paragraph in points.

**-IndentationFirstLinePoints Double optional**

First-line indentation in points.

**-IndentationHangingPoints Double optional**

Hanging indentation in points.

**-KeepLinesTogether Boolean optional**

Keep all paragraph lines together.

**-KeepWithNext Boolean optional**

Keep this paragraph with the next paragraph.

**-LineSpacingPoints Double optional**

Line spacing in points.

**-LineSpacingRule WordLineSpacingRule optional**

Line spacing calculation rule.

Possible values: `Auto`, `Exact`, `AtLeast`

**-PageBreakBefore Boolean optional**

Start the paragraph on a new page.

**-Paragraph WordParagraph optionalposition: 0pipeline: True (ByValue)**

Paragraph to update.

**-PassThru SwitchParameter optional**

Emit the updated paragraph.

**-SpacingAfterPoints Double optional**

Line spacing after the paragraph in points.

**-SpacingBeforePoints Double optional**

Line spacing before the paragraph in points.

**-Style WordParagraphStyles optional**

Paragraph style to apply.

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

**-StyleId String optional**

Paragraph style id to apply.

**-TextDirection WordTextDirection optional**

Paragraph text direction.

Possible values: `LeftToRightTopToBottom`, `LeftToRightTopToBottom2010`, `TopToBottomRightToLeft`, `TopToBottomRightToLeft2010`, `BottomToTopLeftToRight`, `BottomToTopLeftToRight2010`, `LeftToRightTopToBottomRotated`, `LeftToRightTopToBottomRotated2010`, `TopToBottomRightToLeftRotated`, `TopToBottomRightToLeftRotated2010`, `TopToBottomLeftToRightRotated`, `TopToBottomLeftToRightRotated2010`

## 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:3A11C6F136AC551552781E3A329335E85A112A2627770FCA244210D4222BB242 -->
