Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeWordWatermark

Aliases: WordWatermark
Module
PSWriteOffice
Aliases
WordWatermark
Inputs
None

Adds a watermark to the current section or header.

Syntax

Add-OfficeWordWatermark
[-PassThru]
[-Scale <Double>]
[-Text] <String>
[-X <OfficeLength>]
[-Y <OfficeLength>]
[<CommonParameters>]
#
Parameter set: Text
Add-OfficeWordWatermark
[-ImagePath] <String>
[-PassThru]
[-Scale <Double>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[<CommonParameters>]
#
Parameter set: Image

Description

Supports text or image watermarks using OfficeIMO.Word.

Examples

Add a confidentiality watermark while composing a document.

New-OfficeWord -Path .\ProtectedReport.docx {
    Add-OfficeWordParagraph -Text 'Confidential report'
    Add-OfficeWordWatermark -Text 'CONFIDENTIAL' -Scale 1.2
    Protect-OfficeDocument -Restriction ReadOnly -RestrictionPassword 'secret'
}

Applies a text watermark to the current section and then protects the document through OfficeIMO settings.

Add an image watermark.

New-OfficeWord -Path .\DraftReport.docx {
    Add-OfficeWordParagraph -Text 'Draft report'
    Add-OfficeWordWatermark -ImagePath .\Assets\Draft.png -Scale 0.6 -X 20 -Y 40
}

Uses the image watermark path and placement parameters exposed by OfficeIMO.Word.

Parameters

-PassThru SwitchParameter optional
Emit the created watermark.
-Scale Double optional
Scale factor for the watermark.
-Text String requiredposition: 0sets: Text
Watermark text.
-X OfficeLength optional
Horizontal offset for the watermark.
-Y OfficeLength optional
Vertical offset for the watermark.
-ImagePath String requiredposition: 0sets: Image
Path to an image watermark, resolved literally against the current PowerShell location.

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.