# Search and Replace

> Search the text of a TXTextControl document for a string with the Find method or open the built-in search and replace dialog box with FindReplace.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control ActiveX > API Reference > Programming Categories > Search and Replace
- **181 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/search-replace/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/search-replace/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/search-replace/llms-full.txt

---

Two methods of `TXTextControl` search a document: one finds a string in code, the other opens the built-in dialog box for search and replace.

### Methods

| Member | Description |
|---|---|
| [`TXTextControl.Find`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/find-method/llms-full.txt) | Searches the text in a `TXTextControl` for a given string. |
| [`TXTextControl.FindReplace`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/findreplace-method/llms-full.txt) | Displays a 'Find' or 'Replace' dialog box. |

### Related Pages

- [Text Selections and Character Input](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/selections/llms-full.txt): selection, input position, mouse and keyboard events.
- [Built-in Dialog Boxes](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/dialog-boxes/llms-full.txt): every method that opens a built-in dialog box.

---

## Nearby

- **Previous:** [Printing and Print Preview](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/printing/llms-full.txt)
- **Next:** [Line and Character Operations](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/line-character/llms-full.txt)
