View Single Post
 
Old 04-27-2017, 06:11 PM
ilcaa72 ilcaa72 is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Jan 2014
Posts: 27
ilcaa72 is on a distinguished road
Default VBA, Place Sentence in its own Line

I have the following code. So its able to locate each sentence, but now I want to place the sentence in its own line. Not sure what to add to this VBA code to do that. thanks for any help.

Code:
Public Sub ParseDoc()
    Dim doc As Document
    Dim paras As Paragraphs
    Dim para As Paragraph
    Dim sents As Sentences
    Dim sent As Range
    Set doc = ActiveDocument
    Set paras = doc.Paragraphs
    
    For Each para In paras   
        Set sents = para.Range.Sentences

        For Each sent In sents
        
        'place sentence in its own line
        
        Next
    Next
End Sub
BEFORE
The Securities Exchange Act of 1934 was the second major piece of legislation. It resulted from the market crash of 1929. The Securities Exchange Act of 1934 regulates the secondary market. It consists of investor-to-investor transactions. All transactions between two investors that are executed on any of the exchanges. The over-the-counter (OTC) market are secondary market transactions.

AFTER
The Securities Exchange Act of 1934 was the second major piece of legislation.
It resulted from the market crash of 1929.
The Securities Exchange Act of 1934 regulates the secondary market.
It consists of investor-to-investor transactions.
All transactions between two investors that are executed on any of the exchanges.
The over-the-counter (OTC) market are secondary market transactions.
Reply With Quote