Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Macro - reverse lines of text within a selected paragraph

Status
Not open for further replies.

dcorleto

MIS
May 19, 2002
82
US
Please help -

I have the following paragraph in Word

Had last week
Had last 2 weeks
Had last 3 weeks
Had last month

Would like to select the text, run a macro and then have the following result:

Had last month
Had last 3 weeks
Had last 2 weeks
Had last week

(Thereby reversing the order of the selected lines of the paragraph)

Please note that the text is just a sample and will change each time I run the macro - there is no real order to the way the lines within the paragraph are listed. I think I know of a way to do this with a formula in Excel, but would rather not have to take each paragraph out, load it in excel and run formulas, then bring it back to Word - is there a way to do it all within word by using a macro?

Any help is so much appreciated..

DAN
 
Well, yes, you COULD find a paragraph L and tab, but just remember you are then dealing with TWO paragraphs. That may or may not be relevant. yes, you could do a replace, but it would be much easier to use styles.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top