API Reference
Command
Set-OfficeWordBackground
Sets the background for a Word document.
Remarks
Sets the background for a Word document.
Examples
Apply a solid background color.
PS>Set-OfficeWordBackground -Color '#f4f7fb'
Sets the document background to the provided hex color.
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
Set-OfficeWordBackground -Color <String> [-Document <WordDocument>] [-PassThru] [<CommonParameters>]#Parameter set:
ColorParameters
- Color String
- Background color in hex format (#RRGGBB or RRGGBB).
- Document WordDocument
- Document to update when provided explicitly.
- PassThru SwitchParameter
- Emit the updated document.
Outputs
OfficeIMO.Word.WordDocument
Set-OfficeWordBackground [-Document <WordDocument>] [-Height <Nullable`1>] -ImagePath <String> [-PassThru] [-Width <Nullable`1>] [<CommonParameters>]#Parameter set:
ImageParameters
- Document WordDocument
- Document to update when provided explicitly.
- Height Nullable`1
- Optional background image height in pixels.
- ImagePath String
- Path to the background image.
- PassThru SwitchParameter
- Emit the updated document.
- Width Nullable`1
- Optional background image width in pixels.
Outputs
OfficeIMO.Word.WordDocument