# Style Object

> Style OLE Automation object for a paragraph or character formatting style, created with CreateObject: font, paragraph, frame, tab and list properties and Apply.

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

---

A Style object is an OLE Automation object that represents a formatting style. To get a style or to iterate through all existing styles the [Styles](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/llms-full.txt) collection object can be used. A Style object has the following class name that can be used to create a new object with the **CreateObject** function:

TIS.TX.Style.34

A Style object has properties to set or to get attributes for fonts and paragraphs, frames, tabs and list settings. For paragraph-based styles all settings are possible, for character-based styles paragraph, tab and list settings cannot be used. The style's type can be obtained with the [StyleType](https://docs.textcontrol.com/tx-text-control-activex/reference/style/styletype-property/llms-full.txt) property.

### Syntax

```vbscript
Style
```

### Members

#### Properties

| Property | Description |
|---|---|
| [Alignment](https://docs.textcontrol.com/tx-text-control-activex/reference/style/alignment-property/llms-full.txt) | Returns or sets the formatting style's text alignment. |
| [AutoBaseLine](https://docs.textcontrol.com/tx-text-control-activex/reference/style/autobaseline-property/llms-full.txt) | Returns or sets values specifying automatic sub- or superscripted text. |
| [Baseline](https://docs.textcontrol.com/tx-text-control-activex/reference/style/baseline-property/llms-full.txt) | Returns or sets the formatting style's baseline alignment. |
| [BaselineType](https://docs.textcontrol.com/tx-text-control-activex/reference/style/baselinetype-property/llms-full.txt) | Returns or sets the formatting style's baseline type. |
| [BulletAttribute](https://docs.textcontrol.com/tx-text-control-activex/reference/style/bulletattribute-property/llms-full.txt) | This property returns or sets attributes for bulleted lists. |
| [Capitals](https://docs.textcontrol.com/tx-text-control-activex/reference/style/capitals-property/llms-full.txt) | Returns or sets values specifying whether lowercase letters are displayed with capital letters. |
| [CharacterScaling](https://docs.textcontrol.com/tx-text-control-activex/reference/style/characterscaling-property/llms-full.txt) | Returns or sets the style's character scaling, in percent of the average character width. |
| [CharacterSpacing](https://docs.textcontrol.com/tx-text-control-activex/reference/style/characterspacing-property/llms-full.txt) | Returns or sets the style's character spacing value, in twips. |
| [FontBold](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontbold-property/llms-full.txt) | Returns or sets the formatting style's font bold attribute. |
| [FontItalic](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontitalic-property/llms-full.txt) | Returns or sets the formatting style's font italic attribute. |
| [FontName](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontname-property/llms-full.txt) | Returns or sets the formatting style's font. |
| [FontSize](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontsize-property/llms-full.txt) | Returns or sets the formatting style's font size, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [FontStrikethru](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontstrikethru-property/llms-full.txt) | Returns or sets the formatting style's font strikethru attribute. |
| [FontUnderline](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontunderline-property/llms-full.txt) | Returns or sets the formatting style's underlining attributes. |
| [ForeColor](https://docs.textcontrol.com/tx-text-control-activex/reference/style/forecolor-property/llms-full.txt) | Returns or sets the formatting style's text color. |
| [FrameDistance](https://docs.textcontrol.com/tx-text-control-activex/reference/style/framedistance-property/llms-full.txt) | Returns or sets the distance between the text and the frame of a paragraph, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [FrameLineWidth](https://docs.textcontrol.com/tx-text-control-activex/reference/style/framelinewidth-property/llms-full.txt) | Returns or sets the line width of a paragraph's frame, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [FrameStyle](https://docs.textcontrol.com/tx-text-control-activex/reference/style/framestyle-property/llms-full.txt) | Returns or sets the style of a paragraph's frame. |
| [IndentB](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentb-property/llms-full.txt) | Returns or sets the formatting style's additional bottom distance for a paragraph, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [IndentFL](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentfl-property/llms-full.txt) | Returns or sets the formatting style's additional indent for the first line of a paragraph, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [IndentL](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentl-property/llms-full.txt) | Returns or sets the formatting style's left paragraph indent, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [IndentR](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentr-property/llms-full.txt) | Returns or sets the formatting style's right paragraph indent, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [IndentT](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentt-property/llms-full.txt) | Returns or sets the formatting style's additional top distance for a paragraph, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [KeepLinesTogether](https://docs.textcontrol.com/tx-text-control-activex/reference/style/keeplinestogether-property/llms-full.txt) | Gets or sets a value indicating whether a page break is allowed within a paragraph. |
| [KeepWithNext](https://docs.textcontrol.com/tx-text-control-activex/reference/style/keepwithnext-property/llms-full.txt) | If this property is set to true, a paragraph with this formatting style is displayed on the same page as its following paragraph. |
| [LineSpacing](https://docs.textcontrol.com/tx-text-control-activex/reference/style/linespacing-property/llms-full.txt) | Returns or sets the formatting style's line spacing in percent. |
| [LineSpacingT](https://docs.textcontrol.com/tx-text-control-activex/reference/style/linespacingt-property/llms-full.txt) | Returns or sets the formatting style's line spacing, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [ListType](https://docs.textcontrol.com/tx-text-control-activex/reference/style/listtype-property/llms-full.txt) | Returns or sets the formatting style's list type. |
| [Locale](https://docs.textcontrol.com/tx-text-control-activex/reference/style/locale-property/llms-full.txt) | Specifies the style's language. |
| [NextParaStyle](https://docs.textcontrol.com/tx-text-control-activex/reference/style/nextparastyle-property/llms-full.txt) | Returns or sets the name of the style used after the user has pressed the RETURN key. |
| [NumberingAttribute](https://docs.textcontrol.com/tx-text-control-activex/reference/style/numberingattribute-property/llms-full.txt) | This property returns or sets attributes for numbered lists. |
| [PageBreakBefore](https://docs.textcontrol.com/tx-text-control-activex/reference/style/pagebreakbefore-property/llms-full.txt) | If this property is set to true, a paragraph with this formatting style is always displayed on top of a page. |
| [StyleName](https://docs.textcontrol.com/tx-text-control-activex/reference/style/stylename-property/llms-full.txt) | Returns or sets the formatting style's name. |
| [StyleType](https://docs.textcontrol.com/tx-text-control-activex/reference/style/styletype-property/llms-full.txt) | Returns the formatting style's type. |
| [TabPos](https://docs.textcontrol.com/tx-text-control-activex/reference/style/tabpos-property/llms-full.txt) | Returns or sets the formatting style's tabulator position, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |
| [TabType](https://docs.textcontrol.com/tx-text-control-activex/reference/style/tabtype-property/llms-full.txt) | Returns or sets the formatting style's tabulator type. |
| [TextBkColor](https://docs.textcontrol.com/tx-text-control-activex/reference/style/textbkcolor-property/llms-full.txt) | Returns or sets the formatting style's text background color. |
| [WidowOrphanLines](https://docs.textcontrol.com/tx-text-control-activex/reference/style/widoworphanlines-property/llms-full.txt) | Gets or sets the number of lines for widow/orphan control. |

#### Methods

| Method | Description |
|---|---|
| [Apply](https://docs.textcontrol.com/tx-text-control-activex/reference/style/apply-method/llms-full.txt) | Applies all style settings on the current document. |

### See Also

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

---

## In This Section

- [Alignment Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/alignment-property/llms-full.txt): Returns or sets the text alignment of a Style object as an Integer from 1 to 4 for left aligned, right aligned or centered text; available at run time only.
- [Apply Method](https://docs.textcontrol.com/tx-text-control-activex/reference/style/apply-method/llms-full.txt): Applies all settings made on a Style object to the current document, the ones changed since the previous Apply call or since the object was created.
- [AutoBaseLine Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/autobaseline-property/llms-full.txt): Sets automatic sub- or superscript for a Style as a Long: txSuperscript, txSubscript, txSuperscriptUpperEdge and txSubscriptBaseline for diagonal fractions.
- [Baseline Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/baseline-property/llms-full.txt): Sets the baseline alignment of a formatting style as an Integer; BaselineType decides whether the value means superscript or subscript. Run time only.
- [BaselineType Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/baselinetype-property/llms-full.txt): Returns or sets the baseline type of a formatting style: 2 normal, 4 superscript, 8 subscript, or 0 to inherit it from the paragraph in character styles.
- [BulletAttribute Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/bulletattribute-property/llms-full.txt): Returns or sets the bulleted list attributes of a formatting style, with the parameters of TXTextControl.BulletAttribute; ListType must be txListBulleted.
- [Capitals Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/capitals-property/llms-full.txt): Sets whether a Style shows lowercase letters as capitals: txCapitals, txPetiteCapitals at the size of a lowercase x, or txSmallCapitals at x plus 10%.
- [CharacterScaling Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/characterscaling-property/llms-full.txt): Returns or sets the character scaling of a formatting style in percent of the average character width, as an Integer, to condense or expand text.
- [CharacterSpacing Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/characterspacing-property/llms-full.txt): Returns or sets the character spacing of a formatting style in twips, an Integer added to each character: negative values condense text, positive expand it.
- [FontBold Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontbold-property/llms-full.txt): Returns or sets the bold attribute of a formatting style: 0 not bold, 1 bold, or 2 to inherit it from the paragraph style in character-based styles.
- [FontItalic Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontitalic-property/llms-full.txt): Returns or sets the italic attribute of a formatting style: 0 not italic, 1 italic, or 2 to inherit it from the paragraph style in character-based styles.
- [FontName Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontname-property/llms-full.txt): Returns or sets the font name of a formatting style as a String; for character-based styles an empty string inherits the font from the paragraph style.
- [FontSize Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontsize-property/llms-full.txt): Returns or sets the font size of a formatting style in twips; for character-based styles a value of 0 inherits the font size from the paragraph style.
- [FontStrikethru Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontstrikethru-property/llms-full.txt): Returns or sets the strikethrough attribute of a formatting style: 0 off, 1 on, or 2 to inherit it from the paragraph style in character-based styles.
- [FontUnderline Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/fontunderline-property/llms-full.txt): Returns or sets the underlining of a formatting style as flags: single, double, words only, red zigzag line, or &H10 to inherit it from the paragraph style.
- [ForeColor Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/forecolor-property/llms-full.txt): Returns or sets the text color of a formatting style as an RGB Long from 0 to &HFFFFFF, &H40000000 for the system window text color or &H80000000 to inherit it.
- [FrameDistance Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/framedistance-property/llms-full.txt): Returns or sets the distance in twips between the text and the frame of a paragraph formatted with a Style object, as an Integer; available at run time only.
- [FrameLineWidth Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/framelinewidth-property/llms-full.txt): Returns or sets the line width in twips of the paragraph frame of a formatting style, as an Integer; used with FrameStyle and FrameDistance at run time only.
- [FrameStyle Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/framestyle-property/llms-full.txt): Returns or sets the frame style of the paragraphs of a formatting style as a Long, with the same values as the TXTextControl.FrameStyle property. Run time only.
- [IndentB Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentb-property/llms-full.txt): Returns or sets the additional bottom distance in twips below a paragraph formatted with a Style object, as an Integer; available at run time only.
- [IndentFL Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentfl-property/llms-full.txt): Returns or sets the additional first line indent in twips of the paragraphs of a formatting style; the Integer value can be negative for a hanging indent.
- [IndentL Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentl-property/llms-full.txt): Returns or sets the left indent in twips of the paragraphs of a formatting style, as an Integer property of the Style object; available at run time only.
- [IndentR Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentr-property/llms-full.txt): Returns or sets the right paragraph indent in twips of a formatting style as an Integer, the counterpart of the IndentL property; available at run time only.
- [IndentT Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/indentt-property/llms-full.txt): Returns or sets the additional top distance in twips above a paragraph formatted with a Style object, as an Integer; available at run time only.
- [KeepLinesTogether Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/keeplinestogether-property/llms-full.txt): Gets or sets whether a page break is allowed within a paragraph of a formatting style: True keeps all lines of the paragraph together on one page.
- [KeepWithNext Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/keepwithnext-property/llms-full.txt): Gets or sets whether a paragraph of a formatting style stays on the same page as the paragraph that follows it, when the Boolean value is True.
- [LineSpacing Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/linespacing-property/llms-full.txt): Returns or sets the line spacing of a formatting style in percent, as an Integer; the LineSpacingT property sets it in twips instead. Run time only.
- [LineSpacingT Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/linespacingt-property/llms-full.txt): Returns or sets the line spacing of a formatting style in twips, as an Integer; LineSpacing sets it in percent instead. Available at run time only.
- [ListType Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/listtype-property/llms-full.txt): Returns or sets the list type of a Style: txListNone, txListBulleted, txListNumbered or txListStructured, set up with BulletAttribute and NumberingAttribute.
- [Locale Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/locale-property/llms-full.txt): Specifies the language of a formatting style as a Long locale identifier; a value of 0 means that no language is specified for the style.
- [NextParaStyle Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/nextparastyle-property/llms-full.txt): Returns or sets the name of the formatting style that the next paragraph gets after the user presses the RETURN key in a paragraph with this Style.
- [NumberingAttribute Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/numberingattribute-property/llms-full.txt): Returns or sets the numbered list attributes of a Style, as for TXTextControl.NumberingAttribute; effective when ListType is txListNumbered or txListStructured.
- [PageBreakBefore Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/pagebreakbefore-property/llms-full.txt): Gets or sets whether a paragraph of a formatting style always starts at the top of a new page, with a page break before it, when set to True.
- [StyleName Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/stylename-property/llms-full.txt): Returns or sets the name of a formatting style as a String through the Style object; for XML documents the StyleName property is read only. Run time only.
- [StyleType Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/styletype-property/llms-full.txt): Returns the type of a formatting style: 1 for a paragraph-based style or 2 for a character-based style. The Integer property is read only and run time only.
- [TabPos Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/tabpos-property/llms-full.txt): Returns or sets a tab position of a formatting style in twips, for a tab index between 1 and 14, as an Integer property. Run time only.
- [TabType Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/tabtype-property/llms-full.txt): Returns or sets the tab type of a formatting style by tab index 1 to 14: left, right, centered, decimal, or a right tab at the rightmost text position.
- [TextBkColor Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/textbkcolor-property/llms-full.txt): Returns or sets the text background color of a formatting style: an RGB value, the system window color, the control's background color, or inherited.
- [WidowOrphanLines Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/widoworphanlines-property/llms-full.txt): Gets or sets how many lines, 0 to 3, a formatting style keeps together at a page break for widow and orphan control; the value 0 disables the control.

---

## Nearby

- **Previous:** [TextSectionCounter Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txstatusbar/textsectioncounter-property/llms-full.txt)
- **Next:** [Alignment Property](https://docs.textcontrol.com/tx-text-control-activex/reference/style/alignment-property/llms-full.txt)
