View Single Post
  #3   Report Post  
Greg Maxey
 
Posts: n/a
Default

OK maybe this is a little better. Will do anynumber of lines provided each
line is an individual paragraph.

Sub ReverseLineOrder()
Dim myRng As Range
Dim tmpString
Dim i As Integer

Set myRng = Selection.Range
For i = myRng.Paragraphs.Count To 1 Step -1
tmpString = tmpString & myRng.Paragraphs(i).Range
Next i
myRng.Text = tmpString
End Sub

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

sdlfkj wrote:
I have lines of numbers that I need to reverse.

So instead of
3rd line
2nd line
1st line

I need it to read
1st line
2nd line
3rd line

I just want to highlight the 3 lines and click something to reverse
the order instead of cutting and pasting hundreds of times. Any
suggestions?