Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficePowerPointTextBox

Aliases: PowerPointTextBox
Module
PSWriteOffice
Aliases
PowerPointTextBox
Inputs
PSWriteOffice.Foundation.PowerPointSlideSelector
Outputs
OfficeIMO.PowerPoint.PowerPointTextBox

Adds a native text box with deliberate placement and plain or rich content.

Syntax

Add-OfficePowerPointTextBox
[-Column <Int32>]
[-Height <OfficeLength>]
[-Name <String>]
[-PassThru]
[-Slide <PowerPointSlideSelector>]
[-Span <Int32>]
[-Text] <String>
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[<CommonParameters>]
#
Parameter set: Text
Add-OfficePowerPointTextBox
[-Column <Int32>]
[-Content] <ScriptBlock>
[-Height <OfficeLength>]
[-Name <String>]
[-PassThru]
[-Slide <PowerPointSlideSelector>]
[-Span <Int32>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[<CommonParameters>]
#
Parameter set: Content

Examples

Place rich text at physical coordinates.

PowerPointSlide -Title 'Service review' {
    PowerPointTextBox -X 2cm -Y 4cm -Width 12cm -Height 3cm {
        PowerPointParagraph { PowerPointText 'Status: ' -Bold; PowerPointText 'Healthy' }
    }
}

Parameters

-Column Int32 optional
Gets or sets the one-based theme grid column; explicit X overrides its position.
-Height OfficeLength optional
Gets or sets the height; omission uses the native default for fixed placement.
-Name String optional
Gets or sets the native shape name.
-PassThru SwitchParameter optional
Gets or sets whether the live native text box is returned.
-Slide PowerPointSlideSelector optionalpipeline: True (ByValue)
Gets or sets a native slide or one-based position; omission uses the current slide block.
-Span Int32 optional
Gets or sets the grid column count; omission with Column uses twelve. Explicit Width overrides it.
-Text String requiredposition: 0sets: Text
Gets or sets plain text; an empty string creates an empty box.
-Width OfficeLength optional
Gets or sets the width; omission uses the native default for fixed placement.
-X OfficeLength optional
Gets or sets the left coordinate; numbers mean points.
-Y OfficeLength optional
Gets or sets the top coordinate; numbers mean points.
-Content ScriptBlock requiredposition: 0sets: Content
Gets or sets native paragraph and run content.

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.