![]() |
#2
|
|||
|
|||
![]()
Try the code below. By the way, you are searching for spaces twice.
Code:
Sub nnewreplace() Dim e(), f() e = Array(" ", " ", Chr(160), Chr(9), "\(([a-z]{1,})\)") f = Array("", "", "", "", "\1.") Dim i As Integer Dim rng As Range Set rng = Selection.Range For i = LBound(e) To UBound(e) With rng.Find .ClearFormatting .MatchWildcards = True .Text = e(i) .Replacement.Text = f(i) .Wrap = wdFindStop .Execute Replace:=wdReplaceAll End With Next End Sub |
|