# Add-OfficeWordSection

Adds or reuses a section inside the current Word document.

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: WordSection

**Module**

`PSWriteOffice`

**Aliases**

`WordSection`

**Inputs**

`OfficeIMO.Word.WordDocument`

**Outputs**

`OfficeIMO.Word.WordSection`

**Source**

[AddOfficeWordSectionCommand.cs:25](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/AddOfficeWordSectionCommand.cs#L25) 

Adds or reuses a section inside the current Word document.

## Syntax

```
Add-OfficeWordSection
[-BreakType <NextPage|NextColumn|Continuous|EvenPage|OddPage>]
[[-Content] <ScriptBlock>]
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officewordsection-wordsectionbreaktype-scriptblock-switchparameter)

Parameter set: `Context`

```
Add-OfficeWordSection
[-BreakType <NextPage|NextColumn|Continuous|EvenPage|OddPage>]
[[-Content] <ScriptBlock>]
-Document <WordDocument>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officewordsection-wordsectionbreaktype-scriptblock-worddocument-switchparameter)

Parameter set: `Document`

## Description

Provides the DSL entry point for section-level operations inside New-OfficeWord.

## Examples

### Create a section with a paragraph.

```powershell
New-OfficeWord -Path .\doc.docx { Add-OfficeWordSection { Add-OfficeWordParagraph -Text 'Hello' } }
```

Creates a document and inserts a section that contains a single paragraph.

### Add a section to a live document.

```powershell
$section = $document | Add-OfficeWordSection -BreakType NextPage -PassThru
$section | Add-OfficeWordParagraph -Text 'Appendix' -Style Heading1
```

Adds a section through the document pipeline and uses the returned section as the next explicit target.

## Parameters

**-BreakType WordSectionBreakType optional**

Optional section break type.

Possible values: `NextPage`, `NextColumn`, `Continuous`, `EvenPage`, `OddPage`

**-Content ScriptBlock optionalposition: 0**

DSL scriptblock executed within the section scope.

**-PassThru SwitchParameter optional**

Emit the created WordSection.

**-Document WordDocument requiredpipeline: True (ByValue)sets: Document**

Document that will receive a new section.

## 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:2BF90CC25D2B45BB46E6921A6F756EE2FE35B8533C43AA6E74394E6833E83A92 -->
