API Reference

Cmdlet

Set-OfficePowerPointSlideSize

Aliases: PptSlideSize
Namespace PSWriteOffice
Aliases
PptSlideSize
Inputs
OfficeIMO.PowerPoint.PowerPointPresentation
Outputs
OfficeIMO.PowerPoint.PowerPointSlideSize

Sets the slide size for a PowerPoint presentation.

Remarks

Supports common presets as well as explicit width and height in centimeters, inches, points, or EMUs.

Examples

Authored help example

Example 1: Set a standard widescreen presentation size.

PS>


New-OfficePowerPoint -Path .\Examples\Documents\PowerPointWidescreen.pptx {
                Set-OfficePowerPointSlideSize -Preset Screen16x9
                Add-OfficePowerPointSlide -Layout 1 | Set-OfficePowerPointSlideTitle -Title 'Widescreen deck'
            }
        

Applies the 16:9 widescreen preset before adding slides.

Example 2: Set a custom size in centimeters.

PS>


$ppt = New-OfficePowerPoint -FilePath .\Examples\Documents\PowerPointCustomSize.pptx
            Set-OfficePowerPointSlideSize -Presentation $ppt -WidthCm 25.4 -HeightCm 14.0
            Add-OfficePowerPointSlide -Presentation $ppt -Layout 1 | Set-OfficePowerPointSlideTitle -Title 'Custom size'
        

Sets the presentation slide size to a custom 25.4 x 14.0 cm layout.

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.

Syntax

Set-OfficePowerPointSlideSize [-Portrait] [-Presentation <PowerPointPresentation>] -Preset <Screen4x3|Screen16x9|Screen16x10> [<CommonParameters>]
#
Parameter set: Preset

Parameters

Portrait SwitchParameter optionalposition: namedpipeline: False
Apply the preset in portrait orientation.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside New-OfficePowerPoint).
Preset PowerPointSlideSizePreset requiredposition: namedpipeline: Falsevalues: 3
Preset slide size to apply. Possible values: Screen4x3, Screen16x9, Screen16x10
Possible values: Screen4x3, Screen16x9, Screen16x10

Outputs

OfficeIMO.PowerPoint.PowerPointSlideSize

Set-OfficePowerPointSlideSize -HeightCm <Double> [-Presentation <PowerPointPresentation>] -WidthCm <Double> [<CommonParameters>]
#
Parameter set: Centimeters

Parameters

HeightCm Double requiredposition: namedpipeline: False
Custom slide height in centimeters.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside New-OfficePowerPoint).
WidthCm Double requiredposition: namedpipeline: False
Custom slide width in centimeters.

Outputs

OfficeIMO.PowerPoint.PowerPointSlideSize

Set-OfficePowerPointSlideSize -HeightInches <Double> [-Presentation <PowerPointPresentation>] -WidthInches <Double> [<CommonParameters>]
#
Parameter set: Inches

Parameters

HeightInches Double requiredposition: namedpipeline: False
Custom slide height in inches.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside New-OfficePowerPoint).
WidthInches Double requiredposition: namedpipeline: False
Custom slide width in inches.

Outputs

OfficeIMO.PowerPoint.PowerPointSlideSize

Set-OfficePowerPointSlideSize -HeightPoints <Double> [-Presentation <PowerPointPresentation>] -WidthPoints <Double> [<CommonParameters>]
#
Parameter set: Points

Parameters

HeightPoints Double requiredposition: namedpipeline: False
Custom slide height in points.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside New-OfficePowerPoint).
WidthPoints Double requiredposition: namedpipeline: False
Custom slide width in points.

Outputs

OfficeIMO.PowerPoint.PowerPointSlideSize

Set-OfficePowerPointSlideSize -HeightEmus <Int64> [-Presentation <PowerPointPresentation>] -WidthEmus <Int64> [<CommonParameters>]
#
Parameter set: Emus

Parameters

HeightEmus Int64 requiredposition: namedpipeline: False
Custom slide height in EMUs.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside New-OfficePowerPoint).
WidthEmus Int64 requiredposition: namedpipeline: False
Custom slide width in EMUs.

Outputs

OfficeIMO.PowerPoint.PowerPointSlideSize