API Reference
Command
Get-OfficeWordTableOfContent
Gets the table of contents from a Word document.
Remarks
Gets the table of contents from a Word document.
Examples
Retrieve the table of contents if present.
PS>Get-OfficeWordTableOfContent -Path .\Report.docx
Returns the table of contents when one exists.
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-OfficeWordTableOfContent -InputPath <String> [<CommonParameters>]#Parameter set:
PathParameters
- InputPath String
- Path to the .docx file.
Outputs
OfficeIMO.Word.WordTableOfContent
Get-OfficeWordTableOfContent -Document <WordDocument> [<CommonParameters>]#Parameter set:
DocumentParameters
- Document WordDocument
- Word document to read.
Outputs
OfficeIMO.Word.WordTableOfContent