Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Add-OfficeOpenDocumentHeading

Namespace PSWriteOffice
Inputs
OfficeIMO.OpenDocument.OdtDocument
Outputs
OfficeIMO.OpenDocument.OdtParagraph

Adds a heading to an OpenDocument text document.

Remarks

Adds a heading to an OpenDocument text document.

Examples

Authored help example

Add a level-two heading inside an OpenDocument DSL.

PS>


Add-OfficeOpenDocumentHeading -Text 'Results' -Level 2
        

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.

Syntax

Add-OfficeOpenDocumentHeading [-Document <OdtDocument>] [-Level <Int32>] [-PassThru] -Text <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Document OdtDocument optionalposition: namedpipeline: True (ByValue)
OpenDocument text document. Omit inside New-OfficeOpenDocument -Content.
Level Int32 optionalposition: namedpipeline: False
Heading level from 1 through 10.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the created heading paragraph.
Text String requiredposition: 0pipeline: False
Heading text.

Outputs

OfficeIMO.OpenDocument.OdtParagraph