Cmdlet
Update-OfficePowerPointText
Replaces text in the selected slide or document, including tables by default.
Syntax
Update-OfficePowerPointText
[-Document <PowerPointDocument>]
[-IncludeNotes]
[-NewValue] <String>
[-NoTables]
[-OldValue] <String>
[-PassThru]
[-Slide <PowerPointSlideSelector>]
[<CommonParameters>]#Parameter set:
DocumentDescription
Uses the current slide inside PowerPointSlide and the current document inside an open document block. Matching is case-sensitive. Notes are included only with IncludeNotes.
Examples
Update tokens across an existing deck.
Open-OfficePowerPoint -Path .\Account-Review.pptx {
Update-OfficePowerPointText '{{Customer}}' 'Northwind Traders' -IncludeNotes
}Update a slide while preserving its table data.
$count = Update-OfficePowerPointText -Document $deck -Slide 2 -OldValue 'FY24' -NewValue 'FY25' -NoTables -PassThruParameters
- -Document PowerPointDocument
- Document to update or to resolve a one-based slide position against; omission uses the current block.
- -IncludeNotes SwitchParameter
- Include speaker notes in the replacement operation.
- -NewValue String
- Replacement text; null clears each match.
- -NoTables SwitchParameter
- Leave table cell text unchanged.
- -OldValue String
- Text to find.
- -PassThru SwitchParameter
- Emit the object created or changed by the command.
- -Slide PowerPointSlideSelector
- Native slide or one-based slide position; omission updates the current slide or whole document.
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.