# TableMergeCells Method

> Merges all selected table cells into one cell and returns False when the selection is not within a single table; see TableCanMergeCells.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > TableMergeCells Method
- **252 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablemergecells-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablemergecells-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablemergecells-method/llms-full.txt

---

This method merges all selected table cells. The [TableCanMergeCells](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecanmergecells-property/llms-full.txt) property informs whether table cells can be merged or not.

Introduced: 17.0.

### Syntax

```vbscript
TXTextControl.TableMergeCells
```

### Return Value

The method returns True, if the table cells could successfully be merged. The method returns False, if an error has occurred, or if the current selection is not within a single table.

### Data Types

| Name | Data type |
|---|---|
| Return value | Boolean |

### See Also

- [Formatting Text by using Number Formats](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/number-formats/llms-full.txt)
- [Tables](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/llms-full.txt)
- [Using Formulas in Table Cells](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/formulas/llms-full.txt)
- [TableSplitCells Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablesplitcells-method/llms-full.txt)
- [TableCanMergeCells Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecanmergecells-property/llms-full.txt)
- [Programming Category: Tables](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/tables/llms-full.txt)

---

## Nearby

- **Previous:** [TableInsertLines Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableinsertlines-method/llms-full.txt)
- **Next:** [TableNestedLevel Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablenestedlevel-property/llms-full.txt)
