# ChangeCapitalization Method

> Changes the capitalization of the selected characters: capitalize each sentence or word, lowercase, uppercase or toggle case; returns False without a selection.

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

---

Changes the capitalization of all selected characters depending on the Option parameter.

Introduced: 30.0.

### Syntax

```vbscript
TXTextControl.ChangeCapitalization Option
```

### Parameters

| Parameter | Description |
|---|---|
| Option | This parameter specifies how characters are changed. Possible values are the following: |

#### Option

| Constant | Description |
|---|---|
| CapitalizeEachSentence | The first letter of each sentence is capitalized. |
| CapitalizeEachWord | The first letter of each word is capitalized. |
| ToLower | All letters are changed to lowercase. |
| ToUpper | All letters are changed to uppercase. |
| ToggleCase | Lowercase letters are changed to uppercase and vice versa. |

### Return Value

The method returns False, if there is no selected text or if an error has occurred. Otherwise it is True.

### Data Types

| Name | Data type |
|---|---|
| Option | 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:** [Change Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/change-event/llms-full.txt)
- **Next:** [ChangeTextDirection Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/changetextdirection-method/llms-full.txt)
