View Single Post
 
Old 07-04-2022, 10:20 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

Try this macro
Code:
Sub TranslationPrep()
  Dim iPar As Double, aRng As Range, aPar As Paragraph
  Dim iCount As Double, aRngAdd As Range, iExtra As Integer
  With ActiveDocument
    For iPar = .Paragraphs.Count To 1 Step -1
      Set aPar = .Paragraphs(iPar)
      Set aRng = aPar.Range
      If Len(aRng) > 2 Then
        Set aRngAdd = .Range(aRng.Start, aRng.Start)
        iExtra = Len(aRng.Text) - Len(Split(aRng.Text, vbCr)(0))
        If iExtra > 1 Then
          aRng.End = aRng.End - iExtra
          aRngAdd.FormattedText = aRng.FormattedText
          aRngAdd.InsertParagraphAfter
        Else
          aRngAdd.FormattedText = aRng.FormattedText
        End If
        aRngAdd.Font.Hidden = True
        With aRng.Paragraphs.Last.Range
          .Font.ColorIndex = wdBlue
          .ListFormat.RemoveNumbers NumberType:=wdNumberParagraph
        End With
      End If
    Next iPar
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote