API Reference

Cmdlet

Set-OfficeWordShape

Aliases: WordShapeStyle
Namespace PSWriteOffice
Aliases
WordShapeStyle
Inputs
OfficeIMO.Word.WordShape
Outputs
OfficeIMO.Word.WordShape

Updates OfficeIMO Word shape metadata, sizing, and colors.

Remarks

Updates OfficeIMO Word shape metadata, sizing, and colors.

Examples

Authored help example

Restyle callout shapes in an opened report.

PS>


$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.docx
        

Updates OfficeIMO shape objects through the pipeline and persists the document with the standard save command.

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-OfficeWordShape [-Description <String>] [-FillColor <String>] [-Height <Nullable`1>] [-Hidden <Nullable`1>] [-Left <Nullable`1>] [-PassThru] [-Rotation <Nullable`1>] -Shape <WordShape> [-StrokeColor <String>] [-Stroked <Nullable`1>] [-StrokeWidth <Nullable`1>] [-Title <String>] [-Top <Nullable`1>] [-Width <Nullable`1>] [-ZIndex <Nullable`1>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Description String optionalposition: namedpipeline: False
Shape alternate text metadata.
FillColor String optionalposition: namedpipeline: False
Fill color as #RRGGBB.
Height Nullable`1 optionalposition: namedpipeline: False
Shape height in points.
Hidden Nullable`1 optionalposition: namedpipeline: False
Whether the shape is hidden.
Left Nullable`1 optionalposition: namedpipeline: False
Anchored left position in points.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated shape.
Rotation Nullable`1 optionalposition: namedpipeline: False
Shape rotation in degrees.
Shape WordShape requiredposition: 0pipeline: True (ByValue)
Shape to update.
StrokeColor String optionalposition: namedpipeline: False
Stroke color as #RRGGBB.
Stroked Nullable`1 optionalposition: namedpipeline: False
Whether the shape stroke is enabled.
StrokeWidth Nullable`1 optionalposition: namedpipeline: False
Stroke width in points.
Title String optionalposition: namedpipeline: False
Shape title metadata.
Top Nullable`1 optionalposition: namedpipeline: False
Anchored top position in points.
Width Nullable`1 optionalposition: namedpipeline: False
Shape width in points.
ZIndex Nullable`1 optionalposition: namedpipeline: False
Shape z-index.

Outputs

OfficeIMO.Word.WordShape