API Reference

Cmdlet

Add-OfficePowerPointShape

Aliases: PptShape
Namespace PSWriteOffice
Aliases
PptShape
Inputs
OfficeIMO.PowerPoint.PowerPointSlide

Adds a basic shape to a slide.

Remarks

Creates an auto shape at the requested coordinates and applies optional fill and outline styling.

Examples

Authored help example

Example 1: Create a rectangle highlight.

PS>


New-OfficePowerPoint -Path .\Examples\Documents\PowerPointShape.pptx {
                $slide = Add-OfficePowerPointSlide -Layout 1
                Add-OfficePowerPointShape -Slide $slide -ShapeType Rectangle -X 60 -Y 120 -Width 220 -Height 90 -FillColor '#DDEEFF' -OutlineColor '#2563EB' -OutlineWidth 1
                Add-OfficePowerPointTextBox -Slide $slide -Text 'Highlighted status' -X 80 -Y 145 -Width 180 -Height 32
            }
        

Creates a styled rectangle and overlays a text box.

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-OfficePowerPointShape [-FillColor <String>] [-Height <Double>] [-Name <String>] [-OutlineColor <String>] [-OutlineWidth <Nullable`1>] [-ShapeType <String>] [-Slide <PowerPointSlide>] [-Width <Double>] [-X <Double>] [-Y <Double>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

FillColor String optionalposition: namedpipeline: False
Fill color (hex or named color).
Height Double optionalposition: namedpipeline: False
Shape height in points.
Name String optionalposition: namedpipeline: False
Optional name assigned to the shape.
OutlineColor String optionalposition: namedpipeline: False
Outline color (hex or named color).
OutlineWidth Nullable`1 optionalposition: namedpipeline: False
Outline width in points.
ShapeType String optionalposition: namedpipeline: False
Shape geometry preset name (e.g., Rectangle, Ellipse, Line).
Slide PowerPointSlide optionalposition: namedpipeline: True (ByValue)
Target slide that will receive the shape (optional inside DSL).
Width Double optionalposition: namedpipeline: False
Shape width in points.
X Double optionalposition: namedpipeline: False
Left offset (in points) from the slide origin.
Y Double optionalposition: namedpipeline: False
Top offset (in points) from the slide origin.