API Reference
Cmdlet
Get-OfficeWordBookmark
Gets bookmarks from a Word document.
Remarks
Returns WordBookmark objects, optionally filtered by name.
Examples
Example 1: List report bookmarks by name pattern.
PS>
$bookmarks = Get-OfficeWordBookmark -Path .\Report.docx -Name 'Appendix*', 'ExecutiveSummary'
$bookmarks |
Select-Object -Property Name |
Format-Table -AutoSize
Loads the document read-only, filters bookmark names with wildcards, and displays the matching navigation targets.
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-OfficeWordBookmark -InputPath <String> [-Name <String[]>] [<CommonParameters>]#Parameter set:
PathParameters
- InputPath String
- Path to the .docx file.
- Name String[]
- Bookmark name filter (wildcards supported).
Outputs
OfficeIMO.Word.WordBookmark
Get-OfficeWordBookmark -Document <WordDocument> [-Name <String[]>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document WordDocument
- Word document to read.
- Name String[]
- Bookmark name filter (wildcards supported).
Outputs
OfficeIMO.Word.WordBookmark