Need Help with Below Code
I need some help with the below code. I would like to automate this macro to change numbers with the following format:
0001 to 1.
0002 to 2.
0750 to 750.
Up to maybe 0999
Thanks!!!!
Sub ConvertingNumbers()
'
' ConvertingNumbers Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "0001"
.Replacement.Text = "1."
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "0002"
.Replacement.Text = "2."
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
|