View Single Post
 
Old 02-11-2014, 08:38 AM
ilcaa72 ilcaa72 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Jan 2014
Posts: 27
ilcaa72 is on a distinguished road
Default Loop through each Line in Word

hi, i have a looping action for each Sentence and for each paragraph. But i would like to loop through each Line. is this possible?

Code:
Public Sub ParseLines()
    'SPLIT BY PARAGRAPHS
    Dim singleLine As Paragraph
    Dim lineText As String

    For Each singleLine In ActiveDocument.Paragraphs
        lineText = singleLine.Range.Text

        MsgBox lineText

    Next singleLine
End Sub
Reply With Quote