View Single Post
 
Old 07-24-2020, 04:14 AM
eduzs eduzs is offline Windows 10 Office 2019
Expert
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default

Try this

Code:
Dim rng As range
Dim brd As Border
Dim oPara as Paragraph

Set rng = ActiveDocument.range
With rng.Find
.Text = "Para*^13"
.MatchWildcards = True
Do While .Execute
For Each brd In rng.Paragraphs.Borders
With brd
.LineStyle = wdLineStyleSingle
End With
Next brd
rng.Collapse wdCollapseEnd
rng.End = ActiveDocument.range.End
Loop
End With
For Each oPara In ActiveDocument.Paragraphs
    With oPara
        If .Borders(wdBorderLeft).LineStyle Then
            .range.Select
            Selection.MoveDown unit:=wdParagraph, Count:=1, Extend:=wdExtend
            On Error Resume Next
            Selection.range.Borders(wdhorizontal).LineStyle = wdLineStyleSingle
            On Error GoTo 0
        End If
    End With
Next oPara
Reply With Quote