# Find-OfficeWordTable

Finds Word tables containing matching cell text. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Word.WordDocument`

**Outputs**

`OfficeIMO.Word.WordTable`

**Source**

[FindOfficeWordTableCommand.cs:43](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/FindOfficeWordTableCommand.cs#L43) 

Finds Word tables containing matching cell text.

## Syntax

```
Find-OfficeWordTable
[-CaseSensitive]
[-IncludeNested]
[-Path] <String>
[-Text] <String>
[<CommonParameters>]
```

[#](#method-find-officewordtable-switchparameter-switchparameter-string-string)

Parameter set: `PathText`

```
Find-OfficeWordTable
[-CaseSensitive]
[-IncludeNested]
[-Path] <String>
[-Pattern] <String>
[<CommonParameters>]
```

[#](#method-find-officewordtable-switchparameter-switchparameter-string-string-2)

Parameter set: `PathRegex`

```
Find-OfficeWordTable
[-CaseSensitive]
-Document <WordDocument>
[-IncludeNested]
[-Text] <String>
[<CommonParameters>]
```

[#](#method-find-officewordtable-switchparameter-worddocument-switchparameter-string)

Parameter set: `DocumentText`

```
Find-OfficeWordTable
[-CaseSensitive]
-Document <WordDocument>
[-IncludeNested]
[-Pattern] <String>
[<CommonParameters>]
```

[#](#method-find-officewordtable-switchparameter-worddocument-switchparameter-string-2)

Parameter set: `DocumentRegex`

## Description

Searches table cell paragraphs in a Word document and returns the matching WordTable objects. Use this when a document came from a template or another system and the script needs to locate a table by visible marker text before appending rows, changing cells, or applying table-cell formatting.

By default only top-level tables are searched. Use -IncludeNested to include tables inside table cells. Use -Text for literal contains matching or -Pattern for regular expressions.

## Examples

### Find the table that contains a marker and append a row.

```powershell
$doc = Get-OfficeWord -Path .\Report.docx
$table = Find-OfficeWordTable -Document $doc -Text 'Risk register' | Select-Object -First 1
$table | Add-OfficeWordTableRow -Values 'Contoso', 'Open', 'High'
```

Searches table cell paragraphs and returns the matching OfficeIMO table object.

### Find a risk table, append a row, and update a status cell.

```powershell
$doc = Get-OfficeWord -Path .\Handover.docx
$table = Find-OfficeWordTable -Document $doc -Text 'Risk marker' | Select-Object -First 1
$table | Add-OfficeWordTableRow -Values 'Mitigation plan', 'Service Desk', 'Ready'
$table | Get-OfficeWordTableCell -Row 2 -Column 2 |
    Set-OfficeWordTableCell -Text 'Investigating' -ShadingFillColor '#fff2cc' -ShadingPattern Clear
$doc | Close-OfficeWord -Save
```

Shows the common existing-document workflow: locate the table, mutate it, then save the open document.

## Parameters

**-CaseSensitive SwitchParameter optional**

Use case-sensitive matching.

**-IncludeNested SwitchParameter optional**

Include nested tables inside table cells.

**-Path String requiredposition: 0aliases: FilePath, InputPathsets: PathText, PathRegex**

Path to the document to open read-only for searching.

**-Text String requiredposition: 1sets: PathText, DocumentText**

Literal text to find in table cells.

**-Pattern String requiredposition: 1sets: PathRegex, DocumentRegex**

Regular expression pattern to find in table cells.

**-Document WordDocument requiredpipeline: True (ByValue)sets: DocumentText, DocumentRegex**

Open document to inspect. The caller controls the document lifetime.

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

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:9999D8FB86ABBD6CAAC97A53DDF13DDB20242895A880D12CEF990BDBD3D29CAE -->
