Cmdlet
Get-OfficePowerPointLayoutBox
Computes reusable layout boxes for a presentation.
Syntax
Get-OfficePowerPointLayoutBox
[-MarginCm <Double>]
[-Presentation <PowerPointPresentation>]
[<CommonParameters>]#Parameter set:
ContentGet-OfficePowerPointLayoutBox
-ColumnCount <Int32>
[-GutterCm <Double>]
[-MarginCm <Double>]
[-Presentation <PowerPointPresentation>]
[<CommonParameters>]#Parameter set:
ColumnsGet-OfficePowerPointLayoutBox
[-GutterCm <Double>]
[-MarginCm <Double>]
[-Presentation <PowerPointPresentation>]
-RowCount <Int32>
[<CommonParameters>]#Parameter set:
RowsDescription
Returns the content box for a slide or equal column/row boxes derived from the current slide size.
Examples
Get the content area for a deck.
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointLayoutBox.pptx {
$slide = Add-OfficePowerPointSlide -Layout 1 -PassThru
$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.
Split the slide into two columns.
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointColumns.pptx {
$slide = Add-OfficePowerPointSlide -Layout 1 -PassThru
$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.
Parameters
- -MarginCm Double
- Outer slide margin in centimeters.
- -Presentation PowerPointPresentation
- Presentation to inspect (optional inside DSL).
- -ColumnCount Int32
- Number of columns to generate.
- -GutterCm Double
- Column or row gutter in centimeters.
- -RowCount Int32
- Number of rows to generate.
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.