# Add-OfficePowerPointTextBox

Adds a text box to a slide. 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 **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: PptTextBox

**Module**

`PSWriteOffice`

**Aliases**

`PptTextBox`

**Inputs**

`OfficeIMO.PowerPoint.PowerPointSlide`

**Source**

[AddOfficePowerPointTextBoxCommand.cs:22](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/PowerPoint/AddOfficePowerPointTextBoxCommand.cs#L22) 

Adds a text box to a slide.

## Syntax

```
Add-OfficePowerPointTextBox
[-Height <Int32>]
[-PassThru]
[-Slide <PowerPointSlide>]
-Text <String>
[-Width <Int32>]
[-X <Int32>]
[-Y <Int32>]
[<CommonParameters>]
```

[#](#method-add-officepowerpointtextbox-int32-switchparameter-powerpointslide-string-int32-int32-int32)

Parameter set: `Text`

```
Add-OfficePowerPointTextBox
[-Height <Int32>]
[-PassThru]
-Run <Object[]>
[-Slide <PowerPointSlide>]
[-Width <Int32>]
[-X <Int32>]
[-Y <Int32>]
[<CommonParameters>]
```

[#](#method-add-officepowerpointtextbox-int32-switchparameter-object-powerpointslide-int32-int32-int32)

Parameter set: `Run`

## Description

Creates a rectangle at the requested coordinates and assigns the supplied text.

## Examples

### Insert a caption.

```powershell
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointTextBox.pptx {
    $slide = Add-OfficePowerPointSlide -Layout 1 -PassThru
    Add-OfficePowerPointTextBox -Slide $slide -Text 'Quarterly overview' -X 80 -Y 150 -Width 320 -Height 50
    Add-OfficePowerPointTextBox -Slide $slide -Text 'Generated by PSWriteOffice' -X 80 -Y 210 -Width 320 -Height 35
}
```

Places two text boxes on a generated slide.

## Parameters

**-Height Int32 optional**

Box height in points.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Slide PowerPointSlide optionalpipeline: True (ByValue)**

Target slide that will receive the text box (optional inside DSL).

**-Text String requiredsets: Text**

Text to render inside the box.

**-Width Int32 optional**

Box width in points.

**-X Int32 optional**

Left offset (in points) from the slide origin.

**-Y Int32 optional**

Top offset (in points) from the slide origin.

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

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:B823F3D0ED292ABC999BC9D3DE45673E60E7F4B7BAA8DAACACCEE2B1A9A4B1B9 -->
