# Add-OfficeOpenDocumentHeading

Adds a heading to an OpenDocument text document. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

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 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.OpenDocument.OdtDocument`

**Outputs**

`OfficeIMO.OpenDocument.OdtParagraph`

**Source**

[AddOfficeOpenDocumentHeadingCommand.cs:15](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/OpenDocument/AddOfficeOpenDocumentHeadingCommand.cs#L15) 

Adds a heading to an OpenDocument text document.

## Syntax

```
Add-OfficeOpenDocumentHeading
[-Document <OdtDocument>]
[-Level <Int32>]
[-PassThru]
[-Text] <String>
[<CommonParameters>]
```

[#](#method-add-officeopendocumentheading-odtdocument-int32-switchparameter-string)

Parameter set: `All Parameter Sets`

## Examples

### Add a level-two heading inside an OpenDocument DSL.

```powershell
Add-OfficeOpenDocumentHeading -Text 'Results' -Level 2
```

## Parameters

**-Document OdtDocument optionalpipeline: True (ByValue)**

OpenDocument text document. Omit inside New-OfficeOpenDocument -Content.

**-Level Int32 optional**

Heading level from 1 through 10.

**-PassThru SwitchParameter optional**

Emit the created heading paragraph.

**-Text String requiredposition: 0**

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

Evotec API Reference Copyright 2026 Evotec Services

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