Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Commit 9149c84

Browse files
Added WorkBookmarks
1 parent eebde91 commit 9149c84

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

Public/Get-WordBookmark.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function Get-WordBookmark {
2+
[cmdletBinding()]
3+
param(
4+
[parameter(ValueFromPipelineByPropertyName, ValueFromPipeline)][Xceed.Document.NET.Container] $WordDocument
5+
)
6+
$WordDocument.Bookmarks | Select-Object -Property Name, Paragraph
7+
}

Public/Set-WordBookmark.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
function Set-WordBookmark {
2+
[cmdletBinding()]
3+
param(
4+
[string] $BookmarkName,
5+
[string] $BookmarkText
6+
)
7+
$WordDocument.InsertAtBookmark($BookmarkText, $BookmarkName)
8+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ _PSWriteWord_ is PowerShell module to create Microsoft Word documents without Mi
2727

2828
- 1.1.4 - Unreleased
2929
- Fixes for New-WordList
30+
- Added Get-WordBookmark
31+
- Added Set-WordBookmark
3032

3133
- 1.1.3 - 18.01.2020
3234
- Fixes for Colors for Documentimo

0 commit comments

Comments
 (0)