API Reference
Cmdlet
Update-OfficePowerPointText
Replaces text in a PowerPoint slide or presentation.
Remarks
Can replace text in text boxes, tables, and optionally notes using the OfficeIMO text replacement helpers.
Examples
Example 1: Replace fiscal year text across the whole deck.
PS>
$ppt = New-OfficePowerPoint -FilePath .\Examples\Documents\PowerPointUpdateText.pptx
$slide = Add-OfficePowerPointSlide -Presentation $ppt -Layout 1
Add-OfficePowerPointTextBox -Slide $slide -Text 'FY24 summary' | Out-Null
Set-OfficePowerPointNotes -Slide $slide -Text 'Mention FY24 assumptions.' | Out-Null
Update-OfficePowerPointText -Presentation $ppt -OldValue 'FY24' -NewValue 'FY25' -IncludeNotes
Replaces matching text throughout the presentation and notes, returning the replacement count.
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
Update-OfficePowerPointText [-IncludeNotes] [-IncludeTables <Boolean>] -NewValue <String> -OldValue <String> [<CommonParameters>]#Parameter set:
AutoParameters
- IncludeNotes SwitchParameter
- Include notes text in the replacement operation.
- IncludeTables Boolean
- Include table cells in the replacement operation.
- NewValue String
- Replacement text.
- OldValue String
- Text to find.
Outputs
System.Int32
Update-OfficePowerPointText [-IncludeNotes] [-IncludeTables <Boolean>] -NewValue <String> -OldValue <String> [-Presentation <PowerPointPresentation>] [<CommonParameters>]#Parameter set:
PresentationParameters
- IncludeNotes SwitchParameter
- Include notes text in the replacement operation.
- IncludeTables Boolean
- Include table cells in the replacement operation.
- NewValue String
- Replacement text.
- OldValue String
- Text to find.
- Presentation PowerPointPresentation
- Presentation to update.
Outputs
System.Int32
Update-OfficePowerPointText [-IncludeNotes] [-IncludeTables <Boolean>] -NewValue <String> -OldValue <String> [-Slide <PowerPointSlide>] [<CommonParameters>]#Parameter set:
SlideParameters
- IncludeNotes SwitchParameter
- Include notes text in the replacement operation.
- IncludeTables Boolean
- Include table cells in the replacement operation.
- NewValue String
- Replacement text.
- OldValue String
- Text to find.
- Slide PowerPointSlide
- Slide to update.
Outputs
System.Int32