amitrus
02-07-2013, 08:36 AM
Hi All,
I'm new at this, and trying to write a MSWord macro that will find, and then highlight (in yellow), certain kinds of text strings in a MSWord file.
(I searched the forum and couldn't find anything on this point.)
For example:
1) An italicized comma, followed by any non italicized character (even whitespace). Thus, for example:
The second comma in this sentence, which is italicized, should be highlighted by the desired macro.
2) A bolded character (of any kind, even whitespace), that is both preceded and followed by non-bolded characters. Thus, for example:
This first example sentence ends in a bolded punctuation mark. That first period should be highlighted.
3) Any word that is in SmallCaps, and is >4 letters long, but is not capitalized. I don't know how to do smallcaps in html... but imagine for a moment that the following text is in smallcaps in MSWord:
Imagine All of This Is in Small Caps. . . the Word "under" Should Be Highlighted Because It Is More Than Four Characters Long but is not Capitalized
Does anyone know whether this is possible? I know it's quite easy to find normal text-patterns, but adding formatting to those patterns seems to be tricky.
I'm new at this, and trying to write a MSWord macro that will find, and then highlight (in yellow), certain kinds of text strings in a MSWord file.
(I searched the forum and couldn't find anything on this point.)
For example:
1) An italicized comma, followed by any non italicized character (even whitespace). Thus, for example:
The second comma in this sentence, which is italicized, should be highlighted by the desired macro.
2) A bolded character (of any kind, even whitespace), that is both preceded and followed by non-bolded characters. Thus, for example:
This first example sentence ends in a bolded punctuation mark. That first period should be highlighted.
3) Any word that is in SmallCaps, and is >4 letters long, but is not capitalized. I don't know how to do smallcaps in html... but imagine for a moment that the following text is in smallcaps in MSWord:
Imagine All of This Is in Small Caps. . . the Word "under" Should Be Highlighted Because It Is More Than Four Characters Long but is not Capitalized
Does anyone know whether this is possible? I know it's quite easy to find normal text-patterns, but adding formatting to those patterns seems to be tricky.