Cmdlet
Set-OfficePowerPointPlaceholder
Replaces a native slide placeholder with plain text or rich paragraph content.
Syntax
Set-OfficePowerPointPlaceholder
[-IgnoreMissing]
[-Index <UInt32>]
[-PassThru]
[-Slide <PowerPointSlideSelector>]
[-Text] <String>
-Type <PowerPointPlaceholderType>
[<CommonParameters>]#Parameter set:
TextSet-OfficePowerPointPlaceholder
[-Content] <ScriptBlock>
[-IgnoreMissing]
[-Index <UInt32>]
[-PassThru]
[-Slide <PowerPointSlideSelector>]
-Type <PowerPointPlaceholderType>
[<CommonParameters>]#Parameter set:
ContentDescription
Edits the existing text box, preserving its type, index and geometry. Use a New-OfficePowerPoint or Open-OfficePowerPoint content block to save completed edits atomically.
Examples
Fill the current slide's title.
PowerPointPlaceholder -Type Title 'Quarterly review'Fill a body placeholder with native rich paragraphs.
Open-OfficePowerPoint -Path ./Review.pptx {
PowerPointPlaceholder -Slide 2 -Type Body {
PowerPointParagraph { PowerPointText 'Status: ' -Bold; PowerPointText 'Healthy' }
PowerPointParagraph 'All regions are operational.'
}
}Parameters
- -IgnoreMissing SwitchParameter
- Leave the slide unchanged when the placeholder is absent; the content callback is not run.
- -Index UInt32
- Optional native placeholder index within the selected type.
- -PassThru SwitchParameter
- Return the same live native text box after editing.
- -Slide PowerPointSlideSelector
- Native slide or one-based slide number; omission uses the current slide block.
- -Text String
- Replacement plain text; an empty string clears the placeholder.
- -Type PowerPointPlaceholderType
- Placeholder type to update.
- Possible values:
Title,Body,CenteredTitle,SubTitle,DateAndTime,SlideNumber,Footer,Header,Object,Chart,Table,ClipArt,Diagram,Media,SlideImage,Picture - -Content ScriptBlock
- Native rich paragraphs and runs to place in the existing text box.
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.