Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-11-2014, 08:38 AM
ilcaa72 ilcaa72 is offline Loop through each Line in Word Windows 7 64bit Loop through each Line in Word Office 2010 64bit
Novice
Loop through each Line in Word
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop through each Line in Word Loop through Word doc to find and reformat text Sandy27 Word VBA 5 01-06-2014 03:48 PM
Loop through each Line in Word Loop action in Word until not found kilburfi Word VBA 2 07-12-2013 01:26 AM
Loop through each Line in Word How to a For loop in VBA Jennifer Murphy Word VBA 1 01-29-2013 03:30 AM
Loop through each Line in Word Macro to loop in Word Yamaha Rider Word VBA 2 02-07-2012 05:33 PM
Loop through each Line in Word WORD Macro - import picture - resize - position - page break - loop Nano07 Word VBA 2 11-02-2011 05:14 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft