Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficePowerPointSlide

Module
PSWriteOffice
Inputs
PSWriteOffice.Foundation.PowerPointSlideSelector
Outputs
OfficeIMO.PowerPoint.PowerPointSlide

Changes a selected slide's title, template layout, background or transition.

Syntax

Set-OfficePowerPointSlide
[-Background <OfficeColor>]
[-Document <PowerPointDocument>]
[-Master <Int32>]
[-PassThru]
[-Slide] <PowerPointSlideSelector>
[-TemplateLayout <PowerPointLayoutSelector>]
[-Title <String>]
[-Transition <PowerPointSlideTransition>]
[<CommonParameters>]
#
Parameter set: Default
Set-OfficePowerPointSlide
-BackgroundImage <String>
[-Document <PowerPointDocument>]
[-Master <Int32>]
[-PassThru]
[-Slide] <PowerPointSlideSelector>
[-TemplateLayout <PowerPointLayoutSelector>]
[-Title <String>]
[-Transition <PowerPointSlideTransition>]
[<CommonParameters>]
#
Parameter set: BackgroundImage
Set-OfficePowerPointSlide
-ClearBackground
[-Document <PowerPointDocument>]
[-Master <Int32>]
[-PassThru]
[-Slide] <PowerPointSlideSelector>
[-TemplateLayout <PowerPointLayoutSelector>]
[-Title <String>]
[-Transition <PowerPointSlideTransition>]
[<CommonParameters>]
#
Parameter set: ClearBackground

Examples

Rename the first slide.

Set-OfficePowerPointSlide 1 -Document $deck -Title 'Quarterly review'

Apply transitions through the slide pipeline.

Get-OfficePowerPointSlide -Document $deck | Set-OfficePowerPointSlide -Transition Fade

Select a layout from the document's template.

Set-OfficePowerPointSlide 2 -Document $deck -TemplateLayout 'Title and Content'

Parameters

-Background OfficeColor optionalsets: Default
Gets or sets the background color, including theme roles and transparent literals.
-Document PowerPointDocument optional
Gets or sets the document for numeric slide and template layout selection; omission uses the enclosing document block.
-Master Int32 optional
Gets or sets a one-based template master position; defaults to the first.
-PassThru SwitchParameter optional
Gets or sets whether the original native slide is returned.
-Slide PowerPointSlideSelector requiredposition: 0pipeline: True (ByValue)
Gets or sets a native slide or one-based slide position.
-TemplateLayout PowerPointLayoutSelector optional
Gets or sets a template layout by literal name, one-based position, native type or returned metadata. Supply Document when selecting a template layout.
-Title String optional
Gets or sets the title text; an empty string clears an existing title.
-Transition PowerPointSlideTransition optional
Gets or sets the slide transition.
Possible values: Fade, Wipe, BlindsVertical, BlindsHorizontal, CombHorizontal, CombVertical, PushUp, PushDown, PushLeft, PushRight, Cut, Flash, WarpIn, WarpOut, Prism, FerrisLeft, FerrisRight, Morph, Random, CheckerHorizontal, CheckerVertical, CoverLeft, CoverUp, CoverRight, CoverDown, CoverLeftUp, CoverRightUp, CoverLeftDown, CoverRightDown, Dissolve, FadeThroughBlack, UncoverLeft, UncoverUp, UncoverRight, UncoverDown, UncoverLeftUp, UncoverRightUp, UncoverLeftDown, UncoverRightDown, RandomBarsHorizontal, RandomBarsVertical, StripsLeftUp, StripsRightUp, StripsLeftDown, StripsRightDown, WipeUp, WipeRight, WipeDown, BoxOut, BoxIn, SplitHorizontalOut, SplitHorizontalIn, SplitVerticalOut, SplitVerticalIn, Diamond, Plus, Wedge, Newsflash, WheelOneSpoke, WheelTwoSpokes, WheelThreeSpokes, WheelFourSpokes, WheelEightSpokes, Circle, CutThroughBlack
-BackgroundImage String requiredsets: BackgroundImage
Gets or sets a literal local background image path.
-ClearBackground SwitchParameter requiredsets: ClearBackground
Gets or sets whether to remove the slide's background override.

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.