# ChangeTextDirection Method

> Changes the text direction of the selected paragraphs to right-to-left or left-to-right, toggling left and right alignment and tabs; returns True on success.

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

---

Changes the text direction of all selected paragraphs. When the direction of a paragraph is changed this paragraph's alignment is toggled from left to right or from right to left. The alignment of centered and justified paragraphs is not changed. Left and right tabulators are also toggled.

Introduced: 20.0.

### Syntax

```vbscript
TXTextControl.ChangeTextDirection Direction
```

### Parameters

| Parameter | Description |
|---|---|
| Direction | This parameter specifies how to change the text direction. Possible values are the following: |

#### Direction

| Constant | Description |
|---|---|
| txRightToLeft (1) | The text direction is right to left, which means that blocks of text with left to right and right to left characters are ordered from right to left. |
| txLeftToRight (2) | The text direction is left to right, which means that blocks of text with left to right and right to left characters are ordered from left to right. |

### Return Value

The method returns True, if the text direction could be changed. The method returns False, if an error has occurred.

### Data Types

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

### See Also

- [Programming Category: Paragraph Formatting](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/paragraph-formatting/llms-full.txt)

---

## Nearby

- **Previous:** [ChangeCapitalization Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/changecapitalization-method/llms-full.txt)
- **Next:** [CharacterScaling Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/characterscaling-property/llms-full.txt)
