API Reference

Cmdlet

Get-OfficeWordStatistics

Aliases: WordStatistics
Namespace PSWriteOffice
Aliases
WordStatistics
Inputs
OfficeIMO.Word.WordDocument
Outputs
PSWriteOffice.Models.Word.WordDocumentStatisticsInfo

Gets document statistics from a Word document.

Remarks

Returns a PowerShell-friendly snapshot of OfficeIMO.Word statistics for quick reporting and validation.

Examples

Authored help example

Check document complexity before publishing.

PS>


$stats = Get-OfficeWordStatistics -Path .\Report.docx
            $stats |
                Select-Object -Property Paragraphs, Tables, Images, Charts |
                Format-List
        

Reads OfficeIMO.Word statistics and displays the structural counts that matter for a release artifact.

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-OfficeWordStatistics -InputPath <String> [<CommonParameters>]
#
Parameter set: Path

Parameters

InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the Word document.

Outputs

PSWriteOffice.Models.Word.WordDocumentStatisticsInfo: PowerShell-friendly snapshot of Word document statistics.

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

Parameters

Document WordDocument requiredposition: namedpipeline: True (ByValue)
Document to inspect.

Outputs

PSWriteOffice.Models.Word.WordDocumentStatisticsInfo: PowerShell-friendly snapshot of Word document statistics.