Written by Allen Wyatt (last updated March 9, 2024)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021
Jerry routinely needs to work with long documents (perhaps 30 pages) where he needs to reverse the order of the paragraphs in the document. He wonders if there is a way he can reverse the order of all of the paragraphs easily, such that the last is first and the first last.
If you only need to do this one or two times, the easiest method would be to sort the paragraphs. All you need to do is to make sure that each paragraph begins with a three-digit number, in sequential order. Then, select all the paragraphs and sort them as you would normally sort paragraphs—in descending order—and you'll be all set.
Similar to this approach, you could utilize Excel to help with the sorting. This works well if your paragraphs are fairly short:
The downside to this approach is that you don't retain any formatting in your text; it is lost in the translation between Excel and Word. If you want to keep the formatting, you need to do the sort in Word (as previously described), or you need to rely on a macro to do the sorting. The macro approach is also a good idea if you regularly need to do this sort of document processing.
Sub ReveresParagraphs() Dim J As Long Dim Source As Document Set Source = ActiveDocument Documents.Add With Source For J = .Paragraphs.Count To 1 Step -1 .Paragraphs(J).Range.Copy Selection.Paste Next J End With End Sub
This macro creates a new document and then copies each paragraph in reverse order from the original document to the new document. Any formatting present in the source document should also be copied to the new document.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (4803) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021.
The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!
When writing macros, you may need to know which day of the month a particular date represents. Here's how to use the Day ...
Discover MoreNeed to have your macro insert a bit of text into your document? It's easy to do using the TypeText method.
Discover MoreThe Open dialog box is one that few of us think about, but you can control how it behaves with a little bit of macro ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments