OfficeIMO

API Reference

Command

Get-OfficeWordTableOfContent

Namespace PSWriteOffice
Inputs
OfficeIMO.Word.WordDocument
Outputs
OfficeIMO.Word.WordTableOfContent

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: Path

Parameters

InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the .docx file.

Outputs

OfficeIMO.Word.WordTableOfContent

Get-OfficeWordTableOfContent -Document <WordDocument> [<CommonParameters>]
#
Parameter set: Document

Parameters

Document WordDocument requiredposition: namedpipeline: True (ByValue)
Word document to read.

Outputs

OfficeIMO.Word.WordTableOfContent