# Add-OfficeEpubChapter

Adds chapter content, reading order and a navigation entry.

Cmdlet 

Aliases: EpubChapter

**Module**

`PSWriteOffice`

**Aliases**

`EpubChapter`

**Inputs**

`OfficeIMO.Epub.EpubPublication`

**Outputs**

`OfficeIMO.Epub.EpubManifestItem`

**Source**

[AddOfficeEpubChapterCommand.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Epub/AddOfficeEpubChapterCommand.cs#L17) 

Adds chapter content, reading order and a navigation entry.

## Syntax

```
Add-OfficeEpubChapter
[-ContainerPath <String>]
[-Document <EpubPublication>]
[-Id <String>]
[-PassThru]
-Text <String>
[-Title] <String>
[<CommonParameters>]
```

[#](#method-add-officeepubchapter-string-epubpublication-string-switchparameter-string-string)

Parameter set: `Text`

```
Add-OfficeEpubChapter
[-ContainerPath <String>]
[-Document <EpubPublication>]
[-Id <String>]
[-PassThru]
[-Title] <String>
-Xhtml <String>
[<CommonParameters>]
```

[#](#method-add-officeepubchapter-string-epubpublication-string-switchparameter-string-string-2)

Parameter set: `Xhtml`

```
Add-OfficeEpubChapter
[-ContainerPath <String>]
[-Document <EpubPublication>]
[-Id <String>]
-Markdown <String>
[-PassThru]
[-Title] <String>
[<CommonParameters>]
```

[#](#method-add-officeepubchapter-string-epubpublication-string-string-switchparameter-string)

Parameter set: `Markdown`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Project, Access, and EPUB Files](/docs/pswriteoffice/project-access-epub/) Guide
  
  Create and read Microsoft Project schedules, Access databases and EPUB books from PowerShell, without Project or Access installed.
- [Reliable Automation Patterns](/docs/pswriteoffice/automation-patterns/) Guide
  
  Structure document jobs for repeatability, diagnostics, safe mutation, and CI artifacts. Includes examples and cmdlet links.
- [Create and Edit EPUB Files](/docs/epub/create/) Guide
  
  Create EPUB 3 or EPUB 2 e-books in .NET with chapters, styles, images and a table of contents, import an HTML manuscript, and run a preflight check.

## Examples

### Adds chapter content, reading order and a navigation entry.

```powershell
$book | Add-OfficeEpubChapter -Title Opening -Text "Welcome to this handbook."
```

## Parameters

**-ContainerPath String optional**

Optional package-relative XHTML path.

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

Gets or sets an explicit live document; omission uses the enclosing content block.

**-Id String optional**

Optional stable manifest identifier; omission chooses an unused chapter number.

**-PassThru SwitchParameter optional**

Return the created or changed object.

**-Text String requiredsets: Text**

Plain text, escaped into XHTML paragraphs.

**-Title String requiredposition: 0**

Chapter title.

**-Xhtml String requiredsets: Xhtml**

Well-formed XHTML body fragment.

**-Markdown String requiredsets: Markdown**

Markdown rendered by the existing Markdown engine. Unsupported raw HTML remains subject to EPUB validation.

## 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:1865EE0B85E94A75F6F6C6673F67BA698C7216D0A8A4203EF04A4360B6A6790A -->
