API Reference

Cmdlet

Get-OfficePowerPointLayoutBox

Aliases: PptLayoutBox
Namespace PSWriteOffice
Aliases
PptLayoutBox
Inputs
OfficeIMO.PowerPoint.PowerPointPresentation
Outputs
OfficeIMO.PowerPoint.PowerPointLayoutBox

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

Authored help example

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: Content

Parameters

MarginCm Double optionalposition: namedpipeline: False
Outer slide margin in centimeters.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to inspect (optional inside DSL).

Outputs

OfficeIMO.PowerPoint.PowerPointLayoutBox

Get-OfficePowerPointLayoutBox -ColumnCount <Int32> [-GutterCm <Double>] [-MarginCm <Double>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]
#
Parameter set: Columns

Parameters

ColumnCount Int32 requiredposition: namedpipeline: False
Number of columns to generate.
GutterCm Double optionalposition: namedpipeline: False
Column or row gutter in centimeters.
MarginCm Double optionalposition: namedpipeline: False
Outer slide margin in centimeters.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to inspect (optional inside DSL).

Outputs

OfficeIMO.PowerPoint.PowerPointLayoutBox

Get-OfficePowerPointLayoutBox [-GutterCm <Double>] [-MarginCm <Double>] [-Presentation <PowerPointPresentation>] -RowCount <Int32> [<CommonParameters>]
#
Parameter set: Rows

Parameters

GutterCm Double optionalposition: namedpipeline: False
Column or row gutter in centimeters.
MarginCm Double optionalposition: namedpipeline: False
Outer slide margin in centimeters.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to inspect (optional inside DSL).
RowCount Int32 requiredposition: namedpipeline: False
Number of rows to generate.

Outputs

OfficeIMO.PowerPoint.PowerPointLayoutBox