Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficePowerPointSlideSize

Module
PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointDocument
Outputs
OfficeIMO.PowerPoint.PowerPointSlideSize

Sets a presentation's slide size using a preset or physical lengths.

Syntax

Set-OfficePowerPointSlideSize
[-Document <PowerPointDocument>]
[-PassThru]
[-Portrait]
[-Preset] <Screen4x3|Screen16x9|Screen16x10>
[<CommonParameters>]
#
Parameter set: Preset
Set-OfficePowerPointSlideSize
[-Document <PowerPointDocument>]
-Height <OfficeLength>
[-PassThru]
-Width <OfficeLength>
[<CommonParameters>]
#
Parameter set: Size

Description

Numbers mean points; length strings accept pt, cm, mm, in, px or emu. PassThru returns the native slide size.

Examples

Choose a portrait presentation preset.

Set-OfficePowerPointSlideSize -Document $deck -Preset Screen4x3 -Portrait

Set a custom size before authoring slides.

New-OfficePowerPoint -Path ./Review.pptx {
    Set-OfficePowerPointSlideSize -Width '25.4cm' -Height '14cm'
    PowerPointSlide -Title 'Service review'
}

Parameters

-Document PowerPointDocument optionalpipeline: True (ByValue)
Gets or sets an explicit live document; omission uses the enclosing content block.
-PassThru SwitchParameter optional
Gets or sets whether to return the native slide size after editing.
-Portrait SwitchParameter optionalsets: Preset
Gets or sets whether to rotate the chosen preset to portrait orientation.
-Preset PowerPointSlideSizePreset requiredposition: 0sets: Preset
Gets or sets a standard slide size.
Possible values: Screen4x3, Screen16x9, Screen16x10
-Height OfficeLength requiredsets: Size
Gets or sets the custom slide height; numbers mean points.
-Width OfficeLength requiredsets: Size
Gets or sets the custom slide width; numbers mean points.

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.