View Single Post
 
Old 01-25-2018, 05:10 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
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 ofgmayor has much to be proud of
Default

See http://www.gmayor.com/document_batch_processes.htm which will handle the folders'

Then change your macro to the following and run it as a custom process.

Code:
Function BreakLines(oDoc As Document) As Boolean
    On Error GoTo err_Handler
    Application.ScreenUpdating = False
    With ActiveDocument.Content.Paragraphs
        .FirstLineIndent = 0
        .LeftIndent = 0
    End With
    Selection.HomeKey Unit:=wdStory
    Do
        Selection.EndKey Unit:=wdLine
        If Selection.End >= ActiveDocument.Content.End - 1 Then
            Exit Do
        End If
        If Asc(Selection) <> 13 Then
            Selection.InsertParagraphAfter
        End If
        Selection.MoveDown Unit:=wdLine
    Loop
    Application.ScreenUpdating = True
    BreakLines = True
lbl_Exit:
    Exit Function
err_Handler:
    BreakLines = False
    Resume lbl_Exit
End Function
__________________
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