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 <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 Sets

Parameters

Description String optionalposition: namedpipeline: False
Shape alternate text metadata.
FillColor String optionalposition: namedpipeline: False
Fill color as #RRGGBB.
Height Double optionalposition: namedpipeline: False
Shape height in points.
Hidden Boolean optionalposition: namedpipeline: False
Whether the shape is hidden.
Left Double optionalposition: namedpipeline: False
Anchored left position in points.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated shape.
Rotation Double 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 Boolean optionalposition: namedpipeline: False
Whether the shape stroke is enabled.
StrokeWidth Double optionalposition: namedpipeline: False
Stroke width in points.
Title String optionalposition: namedpipeline: False
Shape title metadata.
Top Double optionalposition: namedpipeline: False
Anchored top position in points.
Width Double optionalposition: namedpipeline: False
Shape width in points.
ZIndex Int32 optionalposition: namedpipeline: False
Shape z-index.

Outputs

OfficeIMO.Word.WordShape