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 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.32
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 property.
Style
Property | Description | |
Alignment | Returns or sets the formatting style's text alignment. | |
AutoBaseLine | Returns or sets values specifying automatic sub- or superscripted text. | |
Baseline | Returns or sets the formatting style's baseline alignment. | |
BaselineType | Returns or sets the formatting style's baseline type. | |
BulletAttribute | This property returns or sets attributes for bulleted lists. | |
Capitals | Returns or sets values specifying wheather lowercase letters are displayed with capital letters. | |
CharacterScaling | Returns or sets the style's character scaling, in percent of the average character width. | |
CharacterSpacing | Returns or sets the style's character spacing value, in twips. | |
FontBold | Returns or sets the formatting style's font bold attribute. | |
FontItalic | Returns or sets the formatting style's font italic attribute. | |
FontName | Returns or sets the formatting style's font. | |
FontSize | Returns or sets the formatting style's font size, in twips. | |
FontStrikethru | Returns or sets the formatting style's font strikethru attribute. | |
FontUnderline | Returns or sets the formatting style's underlining attributes. | |
ForeColor | Returns or sets the formatting style's text color. | |
FrameDistance | Returns or sets the distance between the text and the frame of a paragraph, in twips. | |
FrameLineWidth | Returns or sets the line width of a paragraph's frame, in twips. | |
FrameStyle | Returns or sets the style of a paragraph's frame. | |
IndentB | Returns or sets the formatting style's additional bottom distance for a paragraph, in twips. | |
IndentFL | Returns or sets the formatting style's additional indent for the first line of a paragraph, in twips. | |
IndentL | Returns or sets the formatting style's left paragraph indent, in twips. | |
IndentR | Returns or sets the formatting style's right paragraph indent, in twips. | |
IndentT | Returns or sets the formatting style'additional top distance for a paragraph, in twips. | |
KeepLinesTogether | Gets or sets a value indicating whether a page break is allowed within a paragraph. | |
KeepWithNext | If this property is set to true, a paragraph with this formatting style is displayed on the same page as its following paragraph. | |
LineSpacing | Returns or sets the formatting style's line spacing in percent. | |
LineSpacingT | Returns or sets the formatting style's line spacing, in twips. | |
ListType | Returns or sets the formatting style's list type. | |
Locale | Specifies the style's language. | |
NextParaStyle | Returns or sets the name of the style used after the user has pressed the RETURN key. | |
NumberingAttribute | This property returns or sets attributes for numbered lists. | |
PageBreakBefore | If this property is set to true, a paragraph with this formatting style is always displayed on top of a page. | |
StyleName | Returns or sets the formatting style's name. | |
StyleType | Returns the formatting style's type. | |
TabPos | Returns or sets the formatting style's tabulator position, in twips. | |
TabType | Returns or sets the formatting style's tabulator type. | |
TextBkColor | Returns or sets the formatting style's text background color. | |
WidowOrphanLines | Gets or sets the number of lines for widow/orphan control. |
Method | Description | |
Apply | Applies all style settings on the current document. |