API Reference
Cmdlet
Get-OfficeWordTable
Gets tables from a Word document or section.
Remarks
Gets tables from a Word document or section.
Examples
Example 1: Count top-level and nested tables.
PS>
$tables = Get-OfficeWordTable -Path .\Report.docx -IncludeNested
[pscustomobject]@{
Path = '.\Report.docx'
TableCount = @($tables).Count
}
Reads tables from the document and includes nested tables when validating a composed report.
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.
Syntax
Get-OfficeWordTable [-IncludeNested] -InputPath <String> [<CommonParameters>]#Parameter set:
PathParameters
- IncludeNested SwitchParameter
- Include nested tables.
- InputPath String
- Path to the document.
Outputs
OfficeIMO.Word.WordTable
Get-OfficeWordTable -Document <WordDocument> [-IncludeNested] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document WordDocument
- Document to inspect.
- IncludeNested SwitchParameter
- Include nested tables.
Outputs
OfficeIMO.Word.WordTable
Get-OfficeWordTable [-IncludeNested] -Section <WordSection> [<CommonParameters>]#Parameter set:
SectionParameters
- IncludeNested SwitchParameter
- Include nested tables.
- Section WordSection
- Section to enumerate.
Outputs
OfficeIMO.Word.WordTable