# Styles Collection Object

> Styles collection object with all formatting styles of a TX Text Control ActiveX document, obtained with TXTextControl.Styles: Count property and Item method.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Object
- **Path:** TX Text Control ActiveX > API Reference > Styles Collection Object
- **272 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/styles/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/styles/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/styles/llms-full.txt

---

A Styles collection object is an OLE Automation object whose members represent all formatting styles a Text Control document contains. The members of a Styles collection object are OLE Automation objects of the [Style](https://docs.textcontrol.com/tx-text-control-activex/reference/style/llms-full.txt) class. A Styles collection object can be obtained with the [TXTextControl.Styles](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/styles-property/llms-full.txt) property.

### Syntax

```vbscript
Styles
```

### Members

#### Properties

| Property | Description |
|---|---|
| [Count](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/count-property/llms-full.txt) | Returns the number of [Style](https://docs.textcontrol.com/tx-text-control-activex/reference/style/llms-full.txt) objects in the collection which is the number of formatting styles contained in a Text Control document. |

#### Methods

| Method | Description |
|---|---|
| [Item](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/item-method/llms-full.txt) | Returns a specific [Style](https://docs.textcontrol.com/tx-text-control-activex/reference/style/llms-full.txt) object of a [Styles](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/llms-full.txt) collection. |

### See Also

- [Programming Category: Stylesheet Programming](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-programming/llms-full.txt)

---

## In This Section

- [Count Property](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/count-property/llms-full.txt): Returns the number of Style objects in a Styles collection, the number of formatting styles a Text Control document contains, as a Long. Run time only.
- [Item Method](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/item-method/llms-full.txt): Returns the Style object with the given style name from a Styles collection, with Basic examples that read a font, enumerate all styles and change a style.

---

## Nearby

- **Previous:** [WidowOrphanLines Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/widoworphanlines-property/llms-full.txt)
- **Next:** [Count Property](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/count-property/llms-full.txt)
