# Get-OfficeWordTableOfContents

Gets the table of contents of a document. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Word.WordDocument` `System.String[]`

**Outputs**

`OfficeIMO.Word.WordTableOfContent`

**Source**

[GetOfficeWordTableOfContentsCommand.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Word/GetOfficeWordTableOfContentsCommand.cs#L10) 

Gets the table of contents of a document.

## Syntax

```
Get-OfficeWordTableOfContents
[-Document <WordDocument>]
[<CommonParameters>]
```

[#](#method-get-officewordtableofcontents-worddocument)

Parameter set: `Document`

```
Get-OfficeWordTableOfContents
[-Path] <String[]>
[<CommonParameters>]
```

[#](#method-get-officewordtableofcontents-string)

Parameter set: `Path`

```
Get-OfficeWordTableOfContents
-LiteralPath <String[]>
[<CommonParameters>]
```

[#](#method-get-officewordtableofcontents-string-2)

Parameter set: `LiteralPath`

## Examples

### Example 1

```powershell
Get-OfficeWordTableOfContents -Document 'Value'
```

### Example 2

```powershell
Get-OfficeWordTableOfContents -LiteralPath @('C:\Path')
```

### Example 3

```powershell
Get-OfficeWordTableOfContents -Path @('C:\Path')
```

## Parameters

**-Document WordDocument optionalpipeline: True (ByValue)sets: Document**

Document for this inspection.

**-Path String[] requiredposition: 0pipeline: True (ByValue)sets: Path**

Path for this inspection.

**-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath**

LiteralPath for this inspection.

## 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:6C26B8A48E746912D10C762D328868B8DBCF2AA94595145727E29D65F656BB30 -->
