# Get-OfficeWordList

Gets lists, optionally only those with an item matching a pattern.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

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

**Outputs**

`OfficeIMO.Word.WordList`

**Source**

[GetOfficeWordListCommand.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Word/GetOfficeWordListCommand.cs#L12) 

Gets lists, optionally only those with an item matching a pattern.

## Syntax

```
Get-OfficeWordList
[-CaseSensitive]
[-Document <WordDocument>]
[-IncludeEmpty]
[-Pattern <String>]
[-SimpleMatch]
[<CommonParameters>]
```

[#](#method-get-officewordlist-switchparameter-worddocument-switchparameter-string-switchparameter)

Parameter set: `Document`

```
Get-OfficeWordList
[-CaseSensitive]
[-IncludeEmpty]
[-Path] <String[]>
[-Pattern <String>]
[-SimpleMatch]
[<CommonParameters>]
```

[#](#method-get-officewordlist-switchparameter-switchparameter-string-string-switchparameter)

Parameter set: `Path`

```
Get-OfficeWordList
[-CaseSensitive]
[-IncludeEmpty]
-LiteralPath <String[]>
[-Pattern <String>]
[-SimpleMatch]
[<CommonParameters>]
```

[#](#method-get-officewordlist-switchparameter-switchparameter-string-string-switchparameter-2)

Parameter set: `LiteralPath`

```
Get-OfficeWordList
[-CaseSensitive]
[-IncludeEmpty]
[-Pattern <String>]
-Section <WordSection>
[-SimpleMatch]
[<CommonParameters>]
```

[#](#method-get-officewordlist-switchparameter-switchparameter-string-wordsection-switchparameter)

Parameter set: `Section`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Add Bulleted and Numbered Lists in Word](/docs/word/lists/) Guide
  
  Create bulleted, numbered, multi-level and custom-numbered lists in DOCX files, start numbering at any value, and read existing list items in .NET.

## Examples

### Example 1

```powershell
Get-OfficeWordList -CaseSensitive
```

### Example 2

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

### Example 3

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

## Parameters

**-CaseSensitive SwitchParameter optional**

Use case-sensitive matching.

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

Caller-owned document; omission uses the enclosing Word content block.

**-IncludeEmpty SwitchParameter optional**

Include list definitions with no items.

**-Pattern String optional**

Optional regular expression, or literal text with SimpleMatch.

**-SimpleMatch SwitchParameter optional**

Treat Pattern as literal text.

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

Document paths; supports wildcards.

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

Exact document paths, including literal brackets.

**-Section WordSection requiredpipeline: True (ByValue)sets: Section**

Caller-owned section to inspect.

## 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:602CE93BA97CE589E9DDB597B5B8543E83AE8731CCF3F0D032F05B2BA6C3FB9D -->
