Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficePowerPointShapeLayout

Aliases: PowerPointShapeLayout
Module
PSWriteOffice
Aliases
PowerPointShapeLayout
Inputs
System.Object[]
Outputs
OfficeIMO.PowerPoint.PowerPointShape

Aligns, distributes, or arranges PowerPoint shapes using OfficeIMO layout helpers.

Syntax

Set-OfficePowerPointShapeLayout
-Alignment <PowerPointShapeAlignment>
[-InputObject] <Object[]>
[-Margin <OfficeLength>]
[-PassThru]
[-Slide <PowerPointSlideSelector>]
[-ToSlide]
[<CommonParameters>]
#
Parameter set: Alignment
Set-OfficePowerPointShapeLayout
[-Center]
[-CrossAxisAlignment <PowerPointShapeAlignment>]
-Distribute <Horizontal|Vertical>
[-InputObject] <Object[]>
[-Margin <OfficeLength>]
[-PassThru]
[-Slide <PowerPointSlideSelector>]
[-Spacing <OfficeLength>]
[-ToSlide]
[<CommonParameters>]
#
Parameter set: Distribute
Set-OfficePowerPointShapeLayout
[-AutoGrid]
[-Columns <Int32>]
[-Flow <RowMajor|ColumnMajor>]
-Grid
[-GutterX <OfficeLength>]
[-GutterY <OfficeLength>]
[-InputObject] <Object[]>
[-Margin <OfficeLength>]
[-NoResize]
[-PassThru]
[-Rows <Int32>]
[-Slide <PowerPointSlideSelector>]
[-ToSlide]
[<CommonParameters>]
#
Parameter set: Grid

Examples

Align found shapes.

Get-OfficePowerPointShape -Slide $slide -Name 'Kpi.*' |
                Set-OfficePowerPointShapeLayout -Alignment Top

Uses OfficeIMO.PowerPoint to align all matching shapes to the top edge of their selection bounds.

Parameters

-Alignment PowerPointShapeAlignment requiredsets: Alignment
Alignment operation.
Possible values: Left, Center, Right, Top, Middle, Bottom
-InputObject Object[] requiredposition: 0pipeline: True (ByValue)
PowerPoint shapes or shape info records from Get-OfficePowerPointShape.
-Margin OfficeLength optional
Use slide content bounds with the supplied margin; bare numbers mean points.
-PassThru SwitchParameter optional
Emit the arranged shapes.
-Slide PowerPointSlideSelector optional
Native slide or one-based slide number; omission uses the supplied shapes' owning slide.
-ToSlide SwitchParameter optional
Use the full slide bounds instead of the current selection bounds.
-Center SwitchParameter optionalsets: Distribute
Center a fixed-spacing distribution within its bounds.
-CrossAxisAlignment PowerPointShapeAlignment optionalsets: Distribute
Optional cross-axis alignment for even distribution.
Possible values: Left, Center, Right, Top, Middle, Bottom
-Distribute PowerPointShapeDistribution requiredsets: Distribute
Distribution operation.
Possible values: Horizontal, Vertical
-Spacing OfficeLength optionalsets: Distribute
Fixed spacing between distributed shapes; bare numbers mean points.
-AutoGrid SwitchParameter optionalsets: Grid
Let OfficeIMO choose the grid dimensions.
-Columns Int32 optionalsets: Grid
Grid column count. Omit with AutoGrid.
-Flow PowerPointShapeGridFlow optionalsets: Grid
Fill the grid column-by-column instead of row-by-row.
Possible values: RowMajor, ColumnMajor
-Grid SwitchParameter requiredsets: Grid
Arrange shapes in a grid.
-GutterX OfficeLength optionalsets: Grid
Horizontal grid gutter; bare numbers mean points.
-GutterY OfficeLength optionalsets: Grid
Vertical grid gutter; bare numbers mean points.
-NoResize SwitchParameter optionalsets: Grid
Keep each shape's current size when arranging in a grid.
-Rows Int32 optionalsets: Grid
Grid row count. Omit with AutoGrid.

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.