API Reference
Cmdlet
Add-OfficeWordWatermark
Adds a watermark to the current section or header.
Remarks
Supports text or image watermarks using OfficeIMO.Word.
Examples
Example 1: Add a confidentiality watermark while composing a document.
PS>
New-OfficeWord -Path .\ProtectedReport.docx {
Add-OfficeWordParagraph -Text 'Confidential report'
Add-OfficeWordWatermark -Text 'CONFIDENTIAL' -Scale 1.2
Protect-OfficeWordDocument -Password 'secret'
}
Applies a text watermark to the current section and then protects the document through OfficeIMO settings.
Example 2: Add an image watermark.
PS>
New-OfficeWord -Path .\DraftReport.docx {
Add-OfficeWordParagraph -Text 'Draft report'
Add-OfficeWordWatermark -ImagePath .\Assets\Draft.png -Scale 0.6 -HorizontalOffset 20 -VerticalOffset 40
}
Uses the image watermark path and placement parameters exposed by OfficeIMO.Word.
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
Add-OfficeWordWatermark [-HorizontalOffset <Nullable`1>] [-PassThru] [-Scale <Double>] -Text <String> [-VerticalOffset <Nullable`1>] [<CommonParameters>]#Parameter set:
TextParameters
- HorizontalOffset Nullable`1
- Horizontal offset for the watermark.
- PassThru SwitchParameter
- Emit the created watermark.
- Scale Double
- Scale factor for the watermark.
- Text String
- Watermark text.
- VerticalOffset Nullable`1
- Vertical offset for the watermark.
Add-OfficeWordWatermark [-HorizontalOffset <Nullable`1>] -ImagePath <String> [-PassThru] [-Scale <Double>] [-VerticalOffset <Nullable`1>] [<CommonParameters>]#Parameter set:
ImageParameters
- HorizontalOffset Nullable`1
- Horizontal offset for the watermark.
- ImagePath String
- Path to an image watermark.
- PassThru SwitchParameter
- Emit the created watermark.
- Scale Double
- Scale factor for the watermark.
- VerticalOffset Nullable`1
- Vertical offset for the watermark.