E
Ed from AZ
*sigh* I know I've done this before, but I can't find my code and
it's been too long!
My writers constantly present me with a "bulleted" list that needs to
be replaced with a numberred list. The "bullets" consist of a series
of spaces, a hyphen, and a few more spaces, always at the beginning of
the line. I can not use automatic numbering. I am trying to run
through a range using Find with Wildcards = True and replace the text
with what I need. But this is what I've come up with and it won't
work.
x = 0
With rng.Find
.ClearFormatting
.MatchWildcards = True
If .Execute(FindText:="Chr(13) & {Chr(32)}[2,] & " - " & {Chr(32)}
[1,]") Then
x = x + 1
str = "Chr(13) & (" & x & ") "
rng.Text = str
End If
End With
What have I forgotten?
Ed
it's been too long!
My writers constantly present me with a "bulleted" list that needs to
be replaced with a numberred list. The "bullets" consist of a series
of spaces, a hyphen, and a few more spaces, always at the beginning of
the line. I can not use automatic numbering. I am trying to run
through a range using Find with Wildcards = True and replace the text
with what I need. But this is what I've come up with and it won't
work.
x = 0
With rng.Find
.ClearFormatting
.MatchWildcards = True
If .Execute(FindText:="Chr(13) & {Chr(32)}[2,] & " - " & {Chr(32)}
[1,]") Then
x = x + 1
str = "Chr(13) & (" & x & ") "
rng.Text = str
End If
End With
What have I forgotten?
Ed