Cmdlet
Set-OfficeWordShape
Updates OfficeIMO Word shape metadata, sizing, and colors.
Syntax
Set-OfficeWordShape [-Description <String>] [-FillColor <String>] [-Height <Double>] [-Hidden <Boolean>] [-Left <Double>] [-PassThru] [-Rotation <Double>] [-Shape] <WordShape> [-StrokeColor <String>] [-Stroked <Boolean>] [-StrokeWidth <Double>] [-Title <String>] [-Top <Double>] [-Width <Double>] [-ZIndex <Int32>] [<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Restyle callout shapes in an opened report.
$doc = Get-OfficeWord -Path .\Report.docx
$doc |
Get-OfficeWordShape |
Set-OfficeWordShape -FillColor '#fff7e6' -StrokeColor '#fa8c16' -StrokeWidth 1.25 -Description 'Highlighted callout'
$doc | Save-OfficeWord -Path .\Report-Shapes.docxUpdates OfficeIMO shape objects through the pipeline and persists the document with the standard save command.
Parameters
- -Description String
- Shape alternate text metadata.
- -FillColor String
- Fill color. Named colors and hexadecimal values are accepted.
- -Height Double
- Shape height in points.
- Whether the shape is hidden.
- -Left Double
- Anchored left position in points.
- -PassThru SwitchParameter
- Emit the updated shape.
- -Rotation Double
- Shape rotation in degrees.
- -Shape WordShape
- Shape to update.
- -StrokeColor String
- Stroke color. Named colors and hexadecimal values are accepted.
- -Stroked Boolean
- Whether the shape stroke is enabled.
- -StrokeWidth Double
- Stroke width in points.
- -Title String
- Shape title metadata.
- -Top Double
- Anchored top position in points.
- -Width Double
- Shape width in points.
- -ZIndex Int32
- Shape z-index.
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.