ajhez
07-24-2017, 06:01 AM
Hi guys,
Any ideas why the below find and replace code isn't finding '£' located in tables within a word document?
The code finds and replaces all of the £ into € that are in the body of the document, but for some reason it doesn't find all of the '£' that are in word tables with the document.
Private Sub Test()
If ComboBox14.Text <> "€" Then
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "£"
.Replacement.Text = "€"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.CorrectHangulEndings = False
.HanjaPhoneticHangul = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Any ideas?
Thanks,
AJHEZ
Any ideas why the below find and replace code isn't finding '£' located in tables within a word document?
The code finds and replaces all of the £ into € that are in the body of the document, but for some reason it doesn't find all of the '£' that are in word tables with the document.
Private Sub Test()
If ComboBox14.Text <> "€" Then
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "£"
.Replacement.Text = "€"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.CorrectHangulEndings = False
.HanjaPhoneticHangul = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Any ideas?
Thanks,
AJHEZ