Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficePowerPointShape

Module
PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointDocument
Outputs
PSWriteOffice.Services.PowerPoint.PowerPointShapeInfo

Gets editable shape summaries, with optional text, name, kind and position filters.

Syntax

Get-OfficePowerPointShape
[-Document <PowerPointDocument>]
[-Index <Int32[]>]
[-Kind <OfficePowerPointShapeKind[]>]
[-Name <String[]>]
[-Slide <PowerPointSlideSelector>]
[<CommonParameters>]
#
Parameter set: All
Get-OfficePowerPointShape
[-CaseSensitive]
[-Document <PowerPointDocument>]
[-Index <Int32[]>]
[-Kind <OfficePowerPointShapeKind[]>]
[-Name <String[]>]
[-Slide <PowerPointSlideSelector>]
[-Text] <String>
[<CommonParameters>]
#
Parameter set: Text
Get-OfficePowerPointShape
[-CaseSensitive]
[-Document <PowerPointDocument>]
[-Index <Int32[]>]
[-Kind <OfficePowerPointShapeKind[]>]
[-Name <String[]>]
-Pattern <String>
[-Slide <PowerPointSlideSelector>]
[<CommonParameters>]
#
Parameter set: Pattern

Description

Searches every slide of the document unless a native slide or one-based slide number is supplied. Inside PowerPointSlide, omission uses the current slide. Text matching includes table cells.

Examples

Inspect one slide.

Get-OfficePowerPointShape -Document $deck -Slide 2 -Kind Picture

Find and replace a label.

Get-OfficePowerPointShape -Document $deck -Text 'Draft' -Kind TextBox |
                Set-OfficePowerPointShapeText -Text 'Ready'

Parameters

-Document PowerPointDocument optionalpipeline: True (ByValue)
Live document; omission uses the enclosing document block.
-Index Int32[] optional
One-based shape positions within each selected slide.
-Kind OfficePowerPointShapeKind[] optional
Shape kinds to include.
Possible values: TextBox, Picture, Table, Chart, AutoShape, GroupShape
-Name String[] optional
Wildcard shape-name filters.
-Slide PowerPointSlideSelector optional
Native slide or one-based slide number.
-CaseSensitive SwitchParameter optionalsets: Text, Pattern
Match text and names with case sensitivity.
-Text String requiredposition: 0sets: Text
Literal text to find in text boxes or table cells.
-Pattern String requiredsets: Pattern
Regular expression to find in text boxes or table cells.

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.

Outputs

PSWriteOffice.Services.PowerPoint.PowerPointShapeInfo: PowerShell-friendly description of a PowerPoint shape.