API Reference

Cmdlet

Add-OfficeWordShape

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

Adds a basic OfficeIMO Word shape to the current paragraph.

Remarks

Adds a basic OfficeIMO Word shape to the current paragraph.

Examples

Authored help example

Add a callout shape to a report section.

PS>


New-OfficeWord -Path .\StatusReport.docx {
                Add-OfficeWordParagraph -Text 'Release readiness'
                Add-OfficeWordShape -Type Rectangle -Width 220 -Height 56 -FillColor '#e6fffb' -StrokeColor '#08979c' -StrokeWidth 1.5 -Title 'Status callout' -Description 'Release readiness callout'
            }
        

Creates an OfficeIMO Word shape in the current paragraph and sets basic visual and accessibility metadata.

Add an anchored background shape.

PS>


New-OfficeWord -Path .\Appendix.docx {
                Add-OfficeWordParagraph -Text 'Appendix A'
                Add-OfficeWordShape -Type Rectangle -Width 480 -Height 36 -Left 36 -Top 72 -FillColor '#f0f5ff' -StrokeColor '#adc6ff'
            }
        

Positions a shape with explicit offsets when the OfficeIMO anchored-shape API is desired.

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

Add-OfficeWordShape [-Description <String>] [-FillColor <String>] [-Height <Double>] [-Left <Nullable`1>] [-PassThru] [-StrokeColor <String>] [-StrokeWidth <Nullable`1>] [-Title <String>] [-Top <Nullable`1>] [-Type <Rectangle>] [-Width <Double>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Description String optionalposition: namedpipeline: False
Optional alternate text metadata.
FillColor String optionalposition: namedpipeline: False
Fill color as #RRGGBB.
Height Double optionalposition: namedpipeline: False
Height in points.
Left Nullable`1 optionalposition: namedpipeline: False
Anchored left position in points. When omitted, the shape is inline.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the created shape.
StrokeColor String optionalposition: namedpipeline: False
Stroke color as #RRGGBB.
StrokeWidth Nullable`1 optionalposition: namedpipeline: False
Stroke width in points.
Title String optionalposition: namedpipeline: False
Optional title metadata.
Top Nullable`1 optionalposition: namedpipeline: False
Anchored top position in points. When omitted, the shape is inline.
Type ShapeType optionalposition: namedpipeline: Falsevalues: 23
Shape type to add.
Possible values: Rectangle, Ellipse, Line, RoundedRectangle, Triangle, Diamond, Pentagon, Hexagon, Parallelogram, Trapezoid, Chevron, Plus, RightArrow, LeftArrow, UpArrow, DownArrow, LeftRightArrow, Star5, Heart, Cloud, Donut, Can, Cube
Width Double optionalposition: namedpipeline: False
Width in points.

Outputs

OfficeIMO.Word.WordShape