Cmdlet
Set-OfficePowerPointSlideSize
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:
PresetSet-OfficePowerPointSlideSize
[-Document <PowerPointDocument>]
-Height <OfficeLength>
[-PassThru]
-Width <OfficeLength>
[<CommonParameters>]#Parameter set:
SizeDescription
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 -PortraitSet 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
- Gets or sets an explicit live document; omission uses the enclosing content block.
- -PassThru SwitchParameter
- Gets or sets whether to return the native slide size after editing.
- -Portrait SwitchParameter
- Gets or sets whether to rotate the chosen preset to portrait orientation.
- -Preset PowerPointSlideSizePreset
- Gets or sets a standard slide size.
- Possible values:
Screen4x3,Screen16x9,Screen16x10 - -Height OfficeLength
- Gets or sets the custom slide height; numbers mean points.
- -Width OfficeLength
- 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.