# Set-OfficeWordTableCell

Updates native Word cell text, physical geometry and layout flags.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Word.WordTableCell`

**Outputs**

`OfficeIMO.Word.WordTableCell`

**Source**

[SetOfficeWordTableCellCommand.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Word/SetOfficeWordTableCellCommand.cs#L11) 

Updates native Word cell text, physical geometry and layout flags.

## Syntax

```
Set-OfficeWordTableCell
[-BackgroundColor <OfficeColor>]
[-Cell] <WordTableCell>
[-CopyParagraphs]
[-FitText]
[-MarginBottom <OfficeLength>]
[-MarginLeft <OfficeLength>]
[-MarginRight <OfficeLength>]
[-MarginTop <OfficeLength>]
[-MergeDown <Int32>]
[-MergeRight <Int32>]
[-NoWrap]
[-PassThru]
[-ShadingPattern <WordShadingPattern>]
[-SplitHorizontal <Int32>]
[-SplitVertical <Int32>]
[-Text <String>]
[-TextDirection <WordTextDirection>]
[-Width <OfficeLength>]
[<CommonParameters>]
```

[#](#member-0f2629e3f0412ef91ed638f8)

Parameter set: `Default`

```
Set-OfficeWordTableCell
[-BackgroundColor <OfficeColor>]
[-Cell] <WordTableCell>
[-CopyParagraphs]
[-FitText]
[-MarginBottom <OfficeLength>]
[-MarginLeft <OfficeLength>]
[-MarginRight <OfficeLength>]
[-MarginTop <OfficeLength>]
[-MergeDown <Int32>]
[-MergeRight <Int32>]
[-NoWrap]
[-PassThru]
[-ShadingPattern <WordShadingPattern>]
[-SplitHorizontal <Int32>]
[-SplitVertical <Int32>]
[-Text <String>]
[-TextDirection <WordTextDirection>]
-WidthPercent <Double>
[<CommonParameters>]
```

[#](#member-08b690813974f7697a808dc8)

Parameter set: `WidthPercent`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Update Existing Word Documents](/docs/pswriteoffice/word-update-existing/) Guide
  
  Replace content and modify targeted Word structures while preserving the rest of an existing DOCX document.
- [Readable document layouts](/docs/pswriteoffice/document-layout/) Guide
  
  Build readable PSWriteOffice reports with paragraph spacing, table-cell padding, consistent colours, clear chart units, and page-aware layouts.

## Examples

### Example 1

```powershell
Set-OfficeWordTableCell -Cell 'Value'
```

### Example 2

```powershell
Set-OfficeWordTableCell -Cell 'Value' -WidthPercent 1
```

## Parameters

**-BackgroundColor OfficeColor optional**

BackgroundColor for the native cell.

**-Cell WordTableCell requiredposition: 0pipeline: True (ByValue)**

Cell for the native cell.

**-CopyParagraphs SwitchParameter optional**

CopyParagraphs for the native cell.

**-FitText SwitchParameter optional**

FitText for the native cell.

**-MarginBottom OfficeLength optional**

MarginBottom for the native cell.

**-MarginLeft OfficeLength optional**

MarginLeft for the native cell.

**-MarginRight OfficeLength optional**

MarginRight for the native cell.

**-MarginTop OfficeLength optional**

MarginTop for the native cell.

**-MergeDown Int32 optional**

MergeDown for the native cell.

**-MergeRight Int32 optional**

MergeRight for the native cell.

**-NoWrap SwitchParameter optional**

NoWrap for the native cell.

**-PassThru SwitchParameter optional**

PassThru for the native cell.

**-ShadingPattern WordShadingPattern optional**

ShadingPattern for the native cell.

Possible values: `Nil`, `Clear`, `Solid`, `HorizontalStripe`, `VerticalStripe`, `ReverseDiagonalStripe`, `DiagonalStripe`, `HorizontalCross`, `DiagonalCross`, `ThinHorizontalStripe`, `ThinVerticalStripe`, `ThinReverseDiagonalStripe`, `ThinDiagonalStripe`, `ThinHorizontalCross`, `ThinDiagonalCross`, `Percent5`, `Percent10`, `Percent12`, `Percent15`, `Percent20`, `Percent25`, `Percent30`, `Percent35`, `Percent37`, `Percent40`, `Percent45`, `Percent50`, `Percent55`, `Percent60`, `Percent62`, `Percent65`, `Percent70`, `Percent75`, `Percent80`, `Percent85`, `Percent87`, `Percent90`, `Percent95`

**-SplitHorizontal Int32 optional**

SplitHorizontal for the native cell.

**-SplitVertical Int32 optional**

SplitVertical for the native cell.

**-Text String optional**

Text for the native cell.

**-TextDirection WordTextDirection optional**

TextDirection for the native cell.

Possible values: `LeftToRightTopToBottom`, `LeftToRightTopToBottom2010`, `TopToBottomRightToLeft`, `TopToBottomRightToLeft2010`, `BottomToTopLeftToRight`, `BottomToTopLeftToRight2010`, `LeftToRightTopToBottomRotated`, `LeftToRightTopToBottomRotated2010`, `TopToBottomRightToLeftRotated`, `TopToBottomRightToLeftRotated2010`, `TopToBottomLeftToRightRotated`, `TopToBottomLeftToRightRotated2010`

**-Width OfficeLength optionalsets: Default**

Width for the native cell.

**-WidthPercent Double requiredsets: WidthPercent**

WidthPercent for the native cell.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:8DE3F0DAA4847DD7FF5BFA1639340926BBDDF2D7E57220E89793652C37EF862F -->
