C
Culichi
Hi--
I'm using Word XP and VB 6.xx. I've written a macro that does a series
of word searches that works well, but I recently discovered that it's
not recognizing words with accent marks.
Here's what the basic code for finding and marking a word looks like:
'DoSearch is a Find variable defined earlier in the program
With DoSearch
.ClearFormatting
.MatchCase = False
.MatchWholeWord = False
While DoSearch.Execute(FindText:="motin")
With CurrPane.Selection.FormattedText
.HighlightColorIndex = wdGray50
End With
Wend
End With
The text being searched is in Spanish, and so this word--"motin"--should
have an accent over the "i". This search returns "motines", which has no
accent in the plural, but not the singular that has the accent.
It seemed logical to just add another round of this code sequence with
the accented form of the word, but VBA isn't letting me add an accent
over the "i" (at least not using the conventional Ctrl+"'" then "i").
Question: Is there a different way to identify the "i" as accented
within VBA?
Question: Is there an additional modifier, like .ClearFormatting, that
would tell it to ignore accents?
Any help would be greatly appreciated.
Thanks!
Kelley
I'm using Word XP and VB 6.xx. I've written a macro that does a series
of word searches that works well, but I recently discovered that it's
not recognizing words with accent marks.
Here's what the basic code for finding and marking a word looks like:
'DoSearch is a Find variable defined earlier in the program
With DoSearch
.ClearFormatting
.MatchCase = False
.MatchWholeWord = False
While DoSearch.Execute(FindText:="motin")
With CurrPane.Selection.FormattedText
.HighlightColorIndex = wdGray50
End With
Wend
End With
The text being searched is in Spanish, and so this word--"motin"--should
have an accent over the "i". This search returns "motines", which has no
accent in the plural, but not the singular that has the accent.
It seemed logical to just add another round of this code sequence with
the accented form of the word, but VBA isn't letting me add an accent
over the "i" (at least not using the conventional Ctrl+"'" then "i").
Question: Is there a different way to identify the "i" as accented
within VBA?
Question: Is there an additional modifier, like .ClearFormatting, that
would tell it to ignore accents?
Any help would be greatly appreciated.
Thanks!
Kelley