D
Dave Neve
Hi
I asked a question last week and I have since managed to tidy up my macros
as I was no longer sure whether the macros assigned to 'new macros' or 'this
document' or referenced to the .dot was the macro which was running when I
clicked on my tool bar.
So I can now say with certainty that the macro below is the 'guilty' macro.
When searching for words, it changes the font size which might be
16, 14, 12, 10 , for a four lettered word (falling tone) to 12,12,12,12,
(normal font size which I happen use for flat tones).
This possibly didn't show up in my question if you don't allow .html.
Any ideas which line could be doing this?
Thanks
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 = True ' 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 asked a question last week and I have since managed to tidy up my macros
as I was no longer sure whether the macros assigned to 'new macros' or 'this
document' or referenced to the .dot was the macro which was running when I
clicked on my tool bar.
So I can now say with certainty that the macro below is the 'guilty' macro.
When searching for words, it changes the font size which might be
16, 14, 12, 10 , for a four lettered word (falling tone) to 12,12,12,12,
(normal font size which I happen use for flat tones).
This possibly didn't show up in my question if you don't allow .html.
Any ideas which line could be doing this?
Thanks
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 = True ' 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