# FormatSelection Property

> Sets whether character and paragraph formatting properties such as FontBold, FontSize, Alignment and LineSpacing apply to the selection or the whole text.

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

---

Specifies whether character and paragraph formatting properties apply to the whole text or to a particular selection only.

### Syntax

```vbscript
TXTextControl.FormatSelection [= boolean]
```

| Setting | Description |
|---|---|
| True | The formatting properties only apply to selected text. This mode works only at run time, because at design time it is not possible to select text. |
| False | (Default) The formatting properties apply to the complete text. |

### Data Types

Boolean.

### Remarks

The properties which are affected are [Alignment](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/alignment-property/llms-full.txt), [BaseLine](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/baseline-property/llms-full.txt), [FontBold](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontbold-property/llms-full.txt), [FontItalic](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontitalic-property/llms-full.txt), [FontName](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontname-property/llms-full.txt), [FontSize](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontsize-property/llms-full.txt), [FontStrikethru](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontstrikethru-property/llms-full.txt), [FontUnderline](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontunderline-property/llms-full.txt), [FontUnderlineStyle](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontunderlinestyle-property/llms-full.txt), [LineSpacing](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/linespacing-property/llms-full.txt), [LineSpacingT](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/linespacingt-property/llms-full.txt), [ForeColor](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/forecolor-property/llms-full.txt), [TextBkColor](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/textbkcolor-property/llms-full.txt), [TextDirection](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/textdirection-property/llms-full.txt), [Justification](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/justification-property/llms-full.txt).

### See Also

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

---

## Nearby

- **Previous:** [ForeColor Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/forecolor-property/llms-full.txt)
- **Next:** [FormCheckBoxInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formcheckboxinsert-method/llms-full.txt)
