# Add-OfficeOpenDocumentHeading

Adds a heading to an OpenDocument text document.

Cmdlet 

Aliases: OpenDocumentHeading

**Module**

`PSWriteOffice`

**Aliases**

`OpenDocumentHeading`

**Inputs**

`OfficeIMO.OpenDocument.OdtDocument`

**Outputs**

`OfficeIMO.OpenDocument.OdtParagraph`

**Source**

[AddOfficeOpenDocumentHeadingCommand.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/OpenDocument/AddOfficeOpenDocumentHeadingCommand.cs#L16) 

Adds a heading to an OpenDocument text document.

## Syntax

```
Add-OfficeOpenDocumentHeading
[-Alignment <OfficeAlignment>]
[-Bold]
[-Color <OfficeColor>]
[-Document <OdtDocument>]
[-Font <String>]
[-Italic]
[-Level <Int32>]
[-PassThru]
[-Size <OfficeLength>]
[-Strikethrough]
[-Text] <String>
[-Underline <OdfTextDecorationStyle>]
[<CommonParameters>]
```

[#](#method-add-officeopendocumentheading-officealignment-switchparameter-officecolor-odtdocument-string-switchparameter-int32-switchparameter-officelength-switchparameter-string-odftextdecorationstyle)

Parameter set: `Default`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Open Formats and Text Automation](/docs/pswriteoffice/open-text-formats/) Guide
  
  Use the smaller PSWriteOffice families for text, interchange, open formats, and managed message workflows. Includes examples and cmdlet links.
- [Create and Read ODT, ODS and ODP Files](/docs/open-document/create-read/) Guide
  
  Create OpenDocument text, spreadsheet and presentation files, read their content, edit them in place, and open password-protected files.
- [OpenDocument](/docs/open-document/) Guide
  
  Create, read and edit ODT, ODS and ODP files in .NET without LibreOffice, and convert them to Word, Excel, PowerPoint and PDF with a report of anything lost.

## Examples

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

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

## Parameters

**-Alignment OfficeAlignment optional**

Paragraph horizontal alignment.

Possible values: `Left`, `Center`, `Right`, `Justify`, `Start`, `End`

**-Bold SwitchParameter optional**

Apply bold text; explicit false clears it.

**-Color OfficeColor optional**

Opaque RGB text color, including CSS names and theme roles.

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

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

**-Font String optional**

Font family.

**-Italic SwitchParameter optional**

Apply italic text; explicit false clears it.

**-Level Int32 optional**

Heading level from 1 through 10.

**-PassThru SwitchParameter optional**

Emit the created heading paragraph.

**-Size OfficeLength optional**

Font size; a number means points.

**-Strikethrough SwitchParameter optional**

Apply strikethrough; explicit false clears it.

**-Text String requiredposition: 0**

Heading text.

**-Underline OdfTextDecorationStyle optional**

Native ODF underline line style.

Possible values: `Solid`, `Dotted`, `Dash`, `LongDash`, `DotDash`, `DotDotDash`, `Wave`

## 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).

<!-- PowerForge markdown artifact sha256:238740ADB610EDE04DFA35D732AD3C935FEFFF9DDB01D49B6D6837F81E5EE603 -->
