Narrowed down the problem by testing in Word 2002.
I type the word "Potrzebie" in a document somewhere. If I do the following:
* Turn on Record A Macro, hit CTRL-F to call up Find, and search for the text string Potrzebie
it works, both while recording and as a macro.
I change Potrzebie to Heading 6 style. If I do the following:
* Turn on Record A Macro, hit CTRL-F to call up Find, and search for the text string Potrzebie
it works, both while recording and as a macro.
But if I:
* Turn on Record A Macro, hit CTRL-F to call up Find, and search for the text style Heading 6,
it works when I'm recording but DOES NOT WORK as a macro.
This:
Code:
Selection.Find.Style = ActiveDocument.Styles("style name here")
is generated by Word 2002's own Record a Macro code but does not appear to work in Word 2002.
Thoughts? Workarounds? Icepicks to my skull?