View Single Post
 
Old 04-29-2020, 07:00 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

I got the impression that Benali wants to get rid of the time stamps completely and merge the content into a single paragraph. When I copy/pasted from the original post, the lines were separated by a soft return rather than a paragraph mark so I'm going to assume that is what the code needs to work with.

If the above assumptions are right, building on from Paul's code try...
Code:
Sub Demo()
  Application.ScreenUpdating = False
  With ActiveDocument.Range
    With .Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Text = "([0-9:]{5})"
      .Replacement.Text = " "
      .Forward = True
      .Format = False
      .Wrap = wdFindContinue
      .MatchWildcards = True
      .Execute Replace:=wdReplaceAll
      .Text = "^l"   'or ^13
      .Replacement.Text = ""
      .Execute Replace:=wdReplaceAll
    End With
  End With
  Application.ScreenUpdating = True
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote