Hi,
I have this sample (attachment)
114.png
I want to remove each paragraph mark if the lines end with character or punctuation, not a full stop, to make a completely separate paragraph.
I used this code, but it removes all paragraph marks and make all text in single paragraph, which is not my requirement
Code:
Sub RemovePara()
Dim oRng As range
If Len(Selection.range) = 0 Then
MsgBox "Select the text first", vbCritical
Exit Sub
End If
Set oRng = Selection.range
With oRng.Find
.ClearFormatting
.Replacement.ClearFormatting
.text = "^p"
.Replacement.text = " "
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
End Sub
Thanks