![]() |
#5
|
||||
|
||||
![]()
OK, this version doesn't have that issue but won't retain other formatting into the duplicate.
Code:
Sub TranslationPrep() Dim iPar As Double, aRng As Range, aPar As Paragraph Dim iCount As Double, aRngAdd As Range, iExtra As Integer Dim sPar As String With ActiveDocument For iPar = .Paragraphs.Count To 1 Step -1 Set aPar = .Paragraphs(iPar) Set aRng = aPar.Range If Len(Trim(aRng.Text)) > 2 Then Set aRngAdd = .Range(aRng.Start, aRng.Start) sPar = Trim(Split(aRng.Text, vbCr)(0)) aRngAdd.Text = sPar & vbCr 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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Word VBA macro] How to open the website [languagetool.org] and check my Word document? | citroen | Word VBA | 0 | 10-25-2020 05:07 AM |
ms word document text translation using vba code | pk_00 | Word VBA | 1 | 03-02-2020 03:11 PM |
Macro to extract bookmarked data from Word document and insert into another Word Document | VStebler | Word VBA | 3 | 05-03-2018 05:02 PM |
Macro to transfer data from Word to another Word document with bookmark | Jovan Yong | Word VBA | 3 | 04-17-2018 04:27 AM |
![]() |
bville | Word VBA | 2 | 04-11-2013 03:30 PM |