API Reference
Cmdlet
Get-OfficeWordHyperlink
Gets hyperlinks from a Word document.
Remarks
Gets hyperlinks from a Word document.
Examples
Example 1: Audit external hyperlinks in a report.
PS>
$links = Get-OfficeWordHyperlink -Path .\Report.docx -Url 'https://*'
$links |
Select-Object -Property Text, Uri |
Export-Csv -Path .\ReportLinks.csv -NoTypeInformation
Filters external hyperlinks and exports them for link validation or review.
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-OfficeWordHyperlink [-Anchor <String[]>] -InputPath <String> [-Text <String[]>] [-Url <String[]>] [<CommonParameters>]#Parameter set:
PathParameters
- Anchor String[]
- Filter by bookmark anchor (wildcards supported).
- InputPath String
- Path to the document.
- Text String[]
- Filter by hyperlink text (wildcards supported).
- Url String[]
- Filter by external URL (wildcards supported).
Outputs
OfficeIMO.Word.WordHyperLink
Get-OfficeWordHyperlink [-Anchor <String[]>] -Document <WordDocument> [-Text <String[]>] [-Url <String[]>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Anchor String[]
- Filter by bookmark anchor (wildcards supported).
- Document WordDocument
- Document to inspect.
- Text String[]
- Filter by hyperlink text (wildcards supported).
- Url String[]
- Filter by external URL (wildcards supported).
Outputs
OfficeIMO.Word.WordHyperLink
Get-OfficeWordHyperlink [-Anchor <String[]>] -Section <WordSection> [-Text <String[]>] [-Url <String[]>] [<CommonParameters>]#Parameter set:
SectionParameters
- Anchor String[]
- Filter by bookmark anchor (wildcards supported).
- Section WordSection
- Section to inspect.
- Text String[]
- Filter by hyperlink text (wildcards supported).
- Url String[]
- Filter by external URL (wildcards supported).
Outputs
OfficeIMO.Word.WordHyperLink
Get-OfficeWordHyperlink [-Anchor <String[]>] -Paragraph <WordParagraph> [-Text <String[]>] [-Url <String[]>] [<CommonParameters>]#Parameter set:
ParagraphParameters
- Anchor String[]
- Filter by bookmark anchor (wildcards supported).
- Paragraph WordParagraph
- Paragraph to inspect.
- Text String[]
- Filter by hyperlink text (wildcards supported).
- Url String[]
- Filter by external URL (wildcards supported).
Outputs
OfficeIMO.Word.WordHyperLink