# Set-OfficePowerPointShapeText

Sets text on an existing PowerPoint text box. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.Object`

**Outputs**

`OfficeIMO.PowerPoint.PowerPointTextBox`

**Source**

[SetOfficePowerPointShapeTextCommand.cs:33](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/PowerPoint/SetOfficePowerPointShapeTextCommand.cs#L33) 

Sets text on an existing PowerPoint text box.

## Syntax

```
Set-OfficePowerPointShapeText
[-InputObject] <Object>
[-PassThru]
[-Text] <String>
[<CommonParameters>]
```

[#](#method-set-officepowerpointshapetext-object-switchparameter-string)

Parameter set: `Text`

```
Set-OfficePowerPointShapeText
[-InputObject] <Object>
[-PassThru]
-Run <Object[]>
[<CommonParameters>]
```

[#](#method-set-officepowerpointshapetext-object-switchparameter-object)

Parameter set: `Run`

## Description

Accepts either a PowerPointTextBox object or a PowerPointShapeInfo record returned by Find-OfficePowerPointShape or Get-OfficePowerPointShape. This is the direct object-editing counterpart to the creation DSL: locate the text box in an existing deck, replace its contents, then save or close the presentation.

## Examples

### Find a text box and replace its text.

```powershell
Find-OfficePowerPointShape -Presentation $ppt -Text 'Draft' -Kind TextBox |
                Set-OfficePowerPointShapeText -Text 'Ready'
```

Accepts shape metadata returned by Find-OfficePowerPointShape or Get-OfficePowerPointShape.

### Update a status banner in a loaded deck.

```powershell
$ppt = Get-OfficePowerPoint -Path .\Release.pptx
Find-OfficePowerPointShape -Presentation $ppt -Text 'Status marker' -Kind TextBox |
    Set-OfficePowerPointShapeText -Text 'Status marker: Ready for launch'
$ppt | Close-OfficePowerPoint -Save
```

Searches the existing deck, edits the matched text box, and saves the presentation.

## Parameters

**-InputObject Object requiredposition: 0pipeline: True (ByValue)**

PowerPoint text box or shape-info record for a text box to update.

**-PassThru SwitchParameter optional**

Emit the updated text box so additional OfficeIMO operations can continue.

**-Text String requiredposition: 1sets: Text**

Replacement text. A null value clears the text box.

**-Run Object[] requiredaliases: Runssets: Run**

Replacement rich text runs. Each run can be created with TextRun/PowerPointTextRun or provided as a hashtable/object.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:8DD8DBF0DE722F3F20CCDE6A560E7D0DF4089C9EE2CBC898EC63952F11D8DF59 -->
