Try this version then
Code:
Sub CleanParas()
Dim oRng As Range, iType As Integer
For iType = 1 To 2
Set oRng = ActiveDocument.StoryRanges(iType)
With oRng.Find
.ClearFormatting
.Text = "^w^p"
While .Execute
'oRng.Select
oRng.MoveEnd Unit:=wdCharacter, Count:=-1
'oRng.Select
oRng.Text = ""
Wend
End With
Next iType
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Last edited by Guessed; 10-08-2023 at 02:43 PM.
|