API Reference
Cmdlet
Get-OfficeWordParagraph
Gets paragraphs from a Word document or section.
Remarks
Gets paragraphs from a Word document or section.
Examples
Example 1: Extract visible paragraph text.
PS>
$paragraphs = Get-OfficeWordParagraph -Path .\Report.docx
$paragraphs |
Where-Object { $_.Text } |
Select-Object -Property Text |
Set-Content -Path .\ReportParagraphs.txt
Enumerates document paragraphs and writes their text for a lightweight review workflow.
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-OfficeWordParagraph -InputPath <String> [<CommonParameters>]#Parameter set:
PathParameters
- InputPath String
- Path to the document.
Outputs
OfficeIMO.Word.WordParagraph
Get-OfficeWordParagraph -Document <WordDocument> [<CommonParameters>]#Parameter set:
DocumentParameters
- Document WordDocument
- Document to inspect.
Outputs
OfficeIMO.Word.WordParagraph
Get-OfficeWordParagraph -Section <WordSection> [<CommonParameters>]#Parameter set:
SectionParameters
- Section WordSection
- Section to enumerate.
Outputs
OfficeIMO.Word.WordParagraph