S
Steved
Hello from Steved
8 IRISH DIAMOND 4 68X534
13 SILK N SATIN 055
The below macro will highlite 8 IRISH DIAMOND and 13 SILK N SATIN
8 IRISH DIAMOND X4 68534
13 SILK N SATIN X4 68534
The below macro will highlite 8 IRISH DIAMOND X4 68534 and 13
SILK N SATIN X4 68534
With the below macro how can I make it highlite "8 IRISH DIAMOND" and "13
SILK N SATIN" not '8 IRISH DIAMOND X4 68534" and "13 SILK N
SATIN X4 68534"
The issue is the X
Sub Highliter()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "[0-9 ]{1,}[A-Z ]{1,}"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Extend
Selection.Find.ClearFormatting
With Selection.Find
.Text = "[A-Z ]@>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
ActiveDocument.Save
Selection.Font.Color = wdColorRed
Options.DefaultHighlightColorIndex = wdYellow
Selection.Range.HighlightColorIndex = wdYellow
Selection.HomeKey Unit:=wdLine
End Sub
Thankyou
8 IRISH DIAMOND 4 68X534
13 SILK N SATIN 055
The below macro will highlite 8 IRISH DIAMOND and 13 SILK N SATIN
8 IRISH DIAMOND X4 68534
13 SILK N SATIN X4 68534
The below macro will highlite 8 IRISH DIAMOND X4 68534 and 13
SILK N SATIN X4 68534
With the below macro how can I make it highlite "8 IRISH DIAMOND" and "13
SILK N SATIN" not '8 IRISH DIAMOND X4 68534" and "13 SILK N
SATIN X4 68534"
The issue is the X
Sub Highliter()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "[0-9 ]{1,}[A-Z ]{1,}"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Extend
Selection.Find.ClearFormatting
With Selection.Find
.Text = "[A-Z ]@>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
ActiveDocument.Save
Selection.Font.Color = wdColorRed
Options.DefaultHighlightColorIndex = wdYellow
Selection.Range.HighlightColorIndex = wdYellow
Selection.HomeKey Unit:=wdLine
End Sub
Thankyou