View Single Post
 
Old 02-08-2024, 08:08 AM
vivka vivka is offline Windows 7 64bit Office 2016
Competent Performer
 
Join Date: Jul 2023
Posts: 228
vivka is on a distinguished road
Default

Hi, Yacov! It's not difficult:
Code:
Sub MFindReplacePARA()

        With selection.range.Find
            .text = " {1,}([+-]) {1,}"
            .Replacement.text = " \1 "
            .Forward = True
            .Wrap = wdFindStop
            .Format = False
            .MatchWildcards = True
            .MatchSoundsLike = False
            .MatchAllWordForms = False
            .Execute Replace:=wdReplaceAll
        End With
 End Sub
If there's an error, replace ',' with ';' in curly brackets.

You may modify the code to meet your requirements.
Reply With Quote