Cmdlet
Set-OfficePowerPointSlideSize
Sets the slide size for a PowerPoint presentation.
Syntax
Set-OfficePowerPointSlideSize
[-PassThru]
[-Portrait]
[-Presentation <PowerPointPresentation>]
-Preset <Screen4x3| Screen16x9| Screen16x10>
[<CommonParameters>]#Parameter set:
PresetSet-OfficePowerPointSlideSize
-HeightCm <Double>
[-PassThru]
[-Presentation <PowerPointPresentation>]
-WidthCm <Double>
[<CommonParameters>]#Parameter set:
CentimetersSet-OfficePowerPointSlideSize
-HeightInches <Double>
[-PassThru]
[-Presentation <PowerPointPresentation>]
-WidthInches <Double>
[<CommonParameters>]#Parameter set:
InchesSet-OfficePowerPointSlideSize
-HeightPoints <Double>
[-PassThru]
[-Presentation <PowerPointPresentation>]
-WidthPoints <Double>
[<CommonParameters>]#Parameter set:
PointsSet-OfficePowerPointSlideSize
-HeightEmus <Int64>
[-PassThru]
[-Presentation <PowerPointPresentation>]
-WidthEmus <Int64>
[<CommonParameters>]#Parameter set:
EmusDescription
Supports common presets as well as explicit width and height in centimeters, inches, points, or EMUs.
Examples
Set a standard widescreen presentation size.
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointWidescreen.pptx {
Set-OfficePowerPointSlideSize -Preset Screen16x9
Add-OfficePowerPointSlide -Layout 1 -PassThru | Set-OfficePowerPointSlideTitle -Title 'Widescreen deck'
}Applies the 16:9 widescreen preset before adding slides.
Set a custom size in centimeters.
$ppt = New-OfficePowerPoint -Path .\Examples\Documents\PowerPointCustomSize.pptx -NoSave
Set-OfficePowerPointSlideSize -Presentation $ppt -WidthCm 25.4 -HeightCm 14.0
Add-OfficePowerPointSlide -Presentation $ppt -Layout 1 -PassThru | Set-OfficePowerPointSlideTitle -Title 'Custom size'
$ppt | Close-OfficePowerPoint -SaveSets the presentation slide size to a custom 25.4 x 14.0 cm layout.
Parameters
- -PassThru SwitchParameter
- Emit the object created or changed by the command.
- -Portrait SwitchParameter
- Apply the preset in portrait orientation.
- -Presentation PowerPointPresentation
- Presentation to update (optional inside New-OfficePowerPoint).
- -Preset PowerPointSlideSizePreset
- Preset slide size to apply.
- Possible values:
Screen4x3,Screen16x9,Screen16x10 - -HeightCm Double
- Custom slide height in centimeters.
- -WidthCm Double
- Custom slide width in centimeters.
- -HeightInches Double
- Custom slide height in inches.
- -WidthInches Double
- Custom slide width in inches.
- -HeightPoints Double
- Custom slide height in points.
- -WidthPoints Double
- Custom slide width in points.
- -HeightEmus Int64
- Custom slide height in EMUs.
- -WidthEmus Int64
- Custom slide width in EMUs.
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.