S
Souriane
I have the following macro bellow which does the following:
Searches for the following: (district ^#))i).
And replaces it by: )i).
In the document, the text right before “(district ^#))i)” is in italic
but not “(district ^#))i)”.
Once I have done the Search/Replace, “)i)” become in italic also.
How can I have the code modify so that the “)i)” is not in italic
after the search replace?
Thank you!
S.
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorGreen
‘ my code “)i)” is in green in the text and I want it to stay that way
after the Search/Replace
With Selection.Find
.Text = " (district ^#))i)."
.Replacement.Text = ")i)."
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
Searches for the following: (district ^#))i).
And replaces it by: )i).
In the document, the text right before “(district ^#))i)” is in italic
but not “(district ^#))i)”.
Once I have done the Search/Replace, “)i)” become in italic also.
How can I have the code modify so that the “)i)” is not in italic
after the search replace?
Thank you!
S.
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorGreen
‘ my code “)i)” is in green in the text and I want it to stay that way
after the Search/Replace
With Selection.Find
.Text = " (district ^#))i)."
.Replacement.Text = ")i)."
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll