View Single Post
 
Old 08-02-2018, 03:47 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Sorting paragraphs can be rather hit and miss, but a macro will do it e.g.


Code:
Sub Macro1()
Dim oSource As Document
Dim oDoc As Document
Dim lngPara As Long
Dim oRng As Range
    Set oSource = ActiveDocument
    oSource.Save
    Set oDoc = Documents.Add(oSource.FullName)
    oDoc.Range.Text = ""
    For lngPara = oSource.Paragraphs.Count To 1 Step -1
        Set oRng = oDoc.Range
        oRng.Collapse 0
        oRng.FormattedText = oSource.Paragraphs(lngPara).Range.FormattedText
    Next lngPara
lbl_Exit:
    Set oDoc = Nothing
    Set oSource = Nothing
    Set oRng = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote