Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficePowerPointPlaceholder

Aliases: PowerPointPlaceholder
Module
PSWriteOffice
Aliases
PowerPointPlaceholder
Inputs
None
Outputs
OfficeIMO.PowerPoint.PowerPointTextBox

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: Text
Set-OfficePowerPointPlaceholder
[-Content] <ScriptBlock>
[-IgnoreMissing]
[-Index <UInt32>]
[-PassThru]
[-Slide <PowerPointSlideSelector>]
-Type <PowerPointPlaceholderType>
[<CommonParameters>]
#
Parameter set: Content

Description

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 optional
Leave the slide unchanged when the placeholder is absent; the content callback is not run.
-Index UInt32 optional
Optional native placeholder index within the selected type.
-PassThru SwitchParameter optional
Return the same live native text box after editing.
-Slide PowerPointSlideSelector optional
Native slide or one-based slide number; omission uses the current slide block.
-Text String requiredposition: 0sets: Text
Replacement plain text; an empty string clears the placeholder.
-Type PowerPointPlaceholderType required
Placeholder type to update.
Possible values: Title, Body, CenteredTitle, SubTitle, DateAndTime, SlideNumber, Footer, Header, Object, Chart, Table, ClipArt, Diagram, Media, SlideImage, Picture
-Content ScriptBlock requiredposition: 0sets: Content
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.