D
Dave Neve
Hi
I have words in a table which reflect the tones of a foreign language
eg thee (falling tone)
But this special format is changed and becomes
thee (flat tone)
when I do a word search using the following two macros.
As I can't see a line for font, I wonder which line is causing the font size
to change and can I take it out without any other side effects.
Thanks in advance
Sub Highlight()
Dim sSrc As String
Options.DefaultHighlightColorIndex = wdYellow
sSrc = Selection.Text
Resetsearch
Selection.SelectColumn
With Selection.Find
.Text = sSrc
.Replacement.Text = sSrc
.Replacement.Highlight = True
.MatchWholeWord = False ' or true if you like
.Wrap = wdFindStop ' !!!
.Execute Replace:=wdReplaceAll
End With
Resetsearch
End Sub
Sub Resetsearch()
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
End Sub
I have words in a table which reflect the tones of a foreign language
eg thee (falling tone)
But this special format is changed and becomes
thee (flat tone)
when I do a word search using the following two macros.
As I can't see a line for font, I wonder which line is causing the font size
to change and can I take it out without any other side effects.
Thanks in advance
Sub Highlight()
Dim sSrc As String
Options.DefaultHighlightColorIndex = wdYellow
sSrc = Selection.Text
Resetsearch
Selection.SelectColumn
With Selection.Find
.Text = sSrc
.Replacement.Text = sSrc
.Replacement.Highlight = True
.MatchWholeWord = False ' or true if you like
.Wrap = wdFindStop ' !!!
.Execute Replace:=wdReplaceAll
End With
Resetsearch
End Sub
Sub Resetsearch()
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
End Sub