Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficePowerPointLayoutBox

Module
PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointDocument
Outputs
OfficeIMO.PowerPoint.PowerPointLayoutBox

Computes native content, column or row boxes for manual placement.

Syntax

Get-OfficePowerPointLayoutBox
[-Document <PowerPointDocument>]
[-Margin <OfficeLength>]
[<CommonParameters>]
#
Parameter set: Content
Get-OfficePowerPointLayoutBox
-Columns <Int32>
[-Document <PowerPointDocument>]
[-Gutter <OfficeLength>]
[-Margin <OfficeLength>]
[<CommonParameters>]
#
Parameter set: Columns
Get-OfficePowerPointLayoutBox
[-Document <PowerPointDocument>]
[-Gutter <OfficeLength>]
[-Margin <OfficeLength>]
-Rows <Int32>
[<CommonParameters>]
#
Parameter set: Rows

Examples

Get a content box with a physical margin.

$box = Get-OfficePowerPointLayoutBox -Document $deck -Margin 1.5cm

Place text in equal columns.

$columns = Get-OfficePowerPointLayoutBox -Document $deck -Columns 2 -Margin 1.5cm -Gutter 1cm
PowerPointSlide -Document $deck -Title 'Status' {
    PowerPointTextBox 'Healthy' -X $columns[0].Left -Y $columns[0].Top -Width $columns[0].Width -Height 40
}

Parameters

-Document PowerPointDocument optionalpipeline: True (ByValue)
Gets or sets an explicit live document; omission uses the enclosing content block.
-Margin OfficeLength optional
Gets or sets the outer margin; numbers mean points.
-Columns Int32 requiredsets: Columns
Gets or sets the number of columns.
-Gutter OfficeLength optionalsets: Columns, Rows
Gets or sets the space between rows or columns; numbers mean points.
-Rows Int32 requiredsets: Rows
Gets or sets the number of rows.

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.