View Single Post
 
Old 10-08-2023, 03:42 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,160
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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.
Reply With Quote