TxtStyle Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:20

Description

Sets a character style for the selected text by its style name.

Syntax

Text.TxtStyle (str1)

str1        

style name (not the tag name), by partial match.

Return value

Error code

Remarks

To apply a character style by its tag name, see SetStyle. To apply it by its object, see SetTextStyle. To apply it by a dialog box, see TxtStyleDlg.

Examples

Text.TxtStyle ("personal note")

Applies character style named "personal note" on the selected block of text

Text.TxtStyle ("")

removes the current character style from the selected block

Context

Text designer commands

See also

TxtStyleDlg, SetTextStyle

SetStyle, TestTextStyle