EditFindStyle

Syntax

EditFindStyle .Style = text

Remarks

When followed by an EditFind or EditReplace instruction in which .Format is set to 1, specifies the style of the text you want to find. If the specified style does not exist in the active document, or if the capitalization does not match that of the actual style name, an error occurs.

Argument

Explanation

.Style

The name of the style you want to find; to remove a style from the specification, use an empty string ("").


Examples

This example finds and selects the next paragraph formatted with the Heading 2 style:


EditFindClearFormatting
EditFindStyle .Style = "Heading 2"
EditFind .Find = "", .Format = 1

The following example finds the next instance of the word "catnip" in a paragraph of any style. Normally, you use EditFindClearFormatting to remove formatting specifications from a search operation. With the instruction EditFindStyle .Style = "", you can remove the style specification without affecting other search formats set previously.


EditFindStyle .Style = ""
EditFind .Find = "catnip", .Format = 1

See Also

EditFind, EditFindBorder, EditFindFont, EditFindFrame, EditFindLang, EditFindPara, EditFindTabs, EditReplace, EditReplaceStyle, FormatStyle