API Reference
Cmdlet
Get-OfficePowerPointLayoutBox
Computes reusable layout boxes for a presentation.
Remarks
Returns the content box for a slide or equal column/row boxes derived from the current slide size.
Examples
Example 1: Get the content area for a deck.
PS>
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointLayoutBox.pptx {
$slide = Add-OfficePowerPointSlide -Layout 1
$box = Get-OfficePowerPointLayoutBox -MarginCm 1.5
Add-OfficePowerPointTextBox -Slide $slide -Text 'Inside the content box' -X ($box.LeftPoints) -Y ($box.TopPoints) -Width ($box.WidthPoints) -Height 60
}
Returns a content box and uses it to position slide text.
Example 2: Split the slide into two columns.
PS>
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointColumns.pptx {
$slide = Add-OfficePowerPointSlide -Layout 1
$columns = Get-OfficePowerPointLayoutBox -ColumnCount 2 -MarginCm 1.5 -GutterCm 1.0
Add-OfficePowerPointTextBox -Slide $slide -Text 'Left column' -X ($columns[0].LeftPoints) -Y ($columns[0].TopPoints) -Width ($columns[0].WidthPoints) -Height 80
Add-OfficePowerPointTextBox -Slide $slide -Text 'Right column' -X ($columns[1].LeftPoints) -Y ($columns[1].TopPoints) -Width ($columns[1].WidthPoints) -Height 80
}
Uses two layout boxes to place text in columns.
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
Get-OfficePowerPointLayoutBox [-MarginCm <Double>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]#Parameter set:
ContentParameters
- MarginCm Double
- Outer slide margin in centimeters.
- Presentation PowerPointPresentation
- Presentation to inspect (optional inside DSL).
Outputs
OfficeIMO.PowerPoint.PowerPointLayoutBox
Get-OfficePowerPointLayoutBox -ColumnCount <Int32> [-GutterCm <Double>] [-MarginCm <Double>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]#Parameter set:
ColumnsParameters
- ColumnCount Int32
- Number of columns to generate.
- GutterCm Double
- Column or row gutter in centimeters.
- MarginCm Double
- Outer slide margin in centimeters.
- Presentation PowerPointPresentation
- Presentation to inspect (optional inside DSL).
Outputs
OfficeIMO.PowerPoint.PowerPointLayoutBox
Get-OfficePowerPointLayoutBox [-GutterCm <Double>] [-MarginCm <Double>] [-Presentation <PowerPointPresentation>] -RowCount <Int32> [<CommonParameters>]#Parameter set:
RowsParameters
- GutterCm Double
- Column or row gutter in centimeters.
- MarginCm Double
- Outer slide margin in centimeters.
- Presentation PowerPointPresentation
- Presentation to inspect (optional inside DSL).
- RowCount Int32
- Number of rows to generate.
Outputs
OfficeIMO.PowerPoint.PowerPointLayoutBox