Cmdlet
Get-OfficeWordTable
Gets tables from a Word document or section.
Syntax
Get-OfficeWordTable
[-IncludeNested]
[-Path] <String>
[<CommonParameters>]#Parameter set:
PathGet-OfficeWordTable
-Document <WordDocument>
[-IncludeNested]
[<CommonParameters>]#Parameter set:
DocumentGet-OfficeWordTable
[-IncludeNested]
-Section <WordSection>
[<CommonParameters>]#Parameter set:
SectionExamples
Count top-level and nested tables.
$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.
Parameters
- -IncludeNested SwitchParameter
- Include nested tables.
- -Path String
- Path to the document.
- -Document WordDocument
- Document to inspect.
- -Section WordSection
- Section to enumerate.
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.