# TableOfContentsDelete Method

> Deletes the table of contents with the identifier returned by the TableOfContentsDialog method and returns False when the identifier is invalid.

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

---

This method can be used to delete a table of contents.

Introduced: 29.0.

### Syntax

```vbscript
TXTextControl.TableOfContentsDelete TOCId
```

### Parameters

| Parameter | Description |
|---|---|
| TOCId | Specifies the unique identifier of the table of contents. This must be a value returned from the [TableOfContentsDialog](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableofcontentsdialog-method/llms-full.txt) method. |

### Return Value

The return value is True, if the specified table of contents could be deleted. Otherwise, it is False. False is returned, if an error occurred or if the specified identifier is invalid.

### Data Types

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

### See Also

- [Programming Category: Using a Table of Contents](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/table-of-contents/llms-full.txt)

---

## Nearby

- **Previous:** [TableOfContentsCreated Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableofcontentscreated-event/llms-full.txt)
- **Next:** [TableOfContentsDeleted Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableofcontentsdeleted-event/llms-full.txt)
