View Single Post
 
Old 10-05-2023, 08:05 AM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 302
vivka is on a distinguished road
Default

Hi, RobiNew! As far as I know, Find-Replace is the fastest method:
Code:
Sub Del_Paras_Last_Space

Dim oRng As range
Dim iType As Integer
  For iType = 1 To 2
    Set oRng = ActiveDocument.StoryRanges(iType)
    With oRng.Find
       .ClearFormatting
       .Replacement.ClearFormatting
       .text = " ^p"
       .Replacement.text = "^p"
       .Matchwildcards = False
       .Execute Replace:=wdReplaceAll
    End With
  Next iType
End sub
Reply With Quote