# Add-OfficeOpenDocumentParagraph

Adds a paragraph to an OpenDocument text document.

Cmdlet 

Aliases: OpenDocumentParagraph

**Module**

`PSWriteOffice`

**Aliases**

`OpenDocumentParagraph`

**Inputs**

`OfficeIMO.OpenDocument.OdtDocument`

**Outputs**

`OfficeIMO.OpenDocument.OdtParagraph`

**Source**

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

Adds a paragraph to an OpenDocument text document.

## Syntax

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

[#](#method-add-officeopendocumentparagraph-officealignment-switchparameter-officecolor-odtdocument-string-switchparameter-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 body text in the OpenDocument DSL.

```powershell
New-OfficeOpenDocument -Kind Text -Path .\Report.odt -Content { Add-OfficeOpenDocumentParagraph -Text 'Generated by PSWriteOffice' }
```

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

**-PassThru SwitchParameter optional**

Emit the created paragraph.

**-Size OfficeLength optional**

Font size; a number means points.

**-Strikethrough SwitchParameter optional**

Apply strikethrough; explicit false clears it.

**-Text String requiredposition: 0**

Paragraph 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:71B548D395E1AD507440E11BE17B795E32570942A834C282D8B5E7CF6CB7350C -->
