Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeWordTableCell

Aliases: WordTableCell
Module PSWriteOffice
Aliases
WordTableCell
Inputs
OfficeIMO.Word.WordTable
Outputs
OfficeIMO.Word.WordTableCell

Enters a specific table cell and executes nested DSL content inside it.

Syntax

Add-OfficeWordTableCell -Column <Int32> [[-Content] <ScriptBlock>] [-PassThru] -Row <Int32> [-Run <Object[]>] [-Text <String>] [<CommonParameters>]
#
Parameter set: Context
Add-OfficeWordTableCell -Column <Int32> [[-Content] <ScriptBlock>] [-PassThru] -Row <Int32> [-Run <Object[]>] -Table <WordTable> [-Text <String>] [<CommonParameters>]
#
Parameter set: Table

Description

Use this to add paragraphs, lists, images, or nested tables inside a cell selected by row and column.

Examples

Authored help example

Add nested content to a table cell.

WordTable -InputObject $Rows { WordTableCell -Row 1 -Column 0 { WordParagraph { WordText 'Details' } } }

Targets the data cell at row 1, column 0 and writes text inside it.

Parameters

-Column Int32 required
Zero-based column index.
-Content ScriptBlock optionalposition: 0
DSL content executed inside the selected cell.
-PassThru SwitchParameter optional
Emit the selected WordTableCell.
-Row Int32 required
Zero-based row index.
-Run Object[] optionalaliases: Runs
Rich text runs to append to the selected cell before nested content runs.
-Text String optional
Text to append to the selected cell before nested content runs.
-Table WordTable requiredpipeline: True (ByValue)sets: Table
Optional table to target outside the active DSL table scope.

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.