View Single Post
 
Old 12-03-2015, 05:25 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Paul,

Here your code moved down the page lines but only displays the cursor at the start of the line. I'm not sure if the line should be selected or not. If so, this alteration of your code does that.

Code:
Sub Demo()
Dim Rng As Range, Start
Const Pause As Long = 2#
Recycle:
With ActiveDocument.Range
  Set Rng = .Characters.First
  
  Do While Rng.End < .End - 1
    Start = Timer
    Do While Timer < Start + Pause
      DoEvents    ' Yield to other processes.
      Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\Line")
      Rng.Select
    Loop
    If Rng.End = .End - 1 Then GoTo Recycle
    Rng.Collapse wdCollapseEnd
  Loop
End With
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote