C
Carlos Chalhoub
Hi listmates,
I need some help with the following. I am trying to search for the following
string:
I cannot have the string repeat itself more than 6 times in a row. I created
a macro that searches and replaces 7 occurences with 6, 8 with 6, etc.
Example:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "> </span>"
.Replacement.Text = "> </span>"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
The problem is that some documents have 16 occurences of this string, and I
don't want to keep adding to the routine above. It's becoming unmanageable.
Maybe somebody has an idea on a way to cut any extraneous strings over the
6-occurrences. I hope I made myself clear.
Best regards
Carlos
I need some help with the following. I am trying to search for the following
string:
I cannot have the string repeat itself more than 6 times in a row. I created
a macro that searches and replaces 7 occurences with 6, 8 with 6, etc.
Example:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "> </span>"
.Replacement.Text = "> </span>"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
The problem is that some documents have 16 occurences of this string, and I
don't want to keep adding to the routine above. It's becoming unmanageable.
Maybe somebody has an idea on a way to cut any extraneous strings over the
6-occurrences. I hope I made myself clear.
Best regards
Carlos