# SelText Property

> Sets or returns the selected text as a plain string; setting it replaces the selection and sets SelLength to 0. Used with SelStart and SelLength to edit text.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > SelText Property
- **229 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/seltext-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/seltext-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/seltext-property/llms-full.txt

---

Returns or sets the string containing the currently selected text. It is a zero-length string if no characters are selected. This property can be used in conjunction with the [SelStart](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/selstart-property/llms-full.txt) and [SelLength](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sellength-property/llms-full.txt) properties for tasks such as selecting substrings or clearing text. In conjunction with the clipboard these properties are useful for copy, cut, and paste operations.

### Syntax

```vbscript
TXTextControl.SelText [= value]
```

### Data Types

String.

### Limitations

Run time only.

### Remarks

Setting this property to a new value sets [SelLength](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sellength-property/llms-full.txt) to 0 and replaces the selected text with the new string.

### See Also

- [SelLength Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sellength-property/llms-full.txt)
- [SelStart Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/selstart-property/llms-full.txt)
- [Programming Category: Text Selections and Character Input](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/selections/llms-full.txt)

---

## Nearby

- **Previous:** [SelStart Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/selstart-property/llms-full.txt)
- **Next:** [ShrinkFont Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/shrinkfont-method/llms-full.txt)
