Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Sorting by Headings.

Sorting by Headings

by Allen Wyatt
(last updated September 17, 2016)

10

A useful trick you can use when developing some types of documents is the ability to sort the various parts of the document based on the headings you use. For instance, you can sort the document based on first-level headings (paragraphs that use the Heading 1 style) by following these steps:

  1. Switch to Outline view. (Either click the Outline view button on the status bar or go to the View tab of the Ribbon and select Outline in the Views group.)
  2. Using the controls on the Outlining tab of the ribbon, collapse the headings so that only the first-level headings are shown. (This step is not strictly necessary, but does make the screen a bit more readable.)
  3. Place the cursor at the beginning of the first heading and press Ctrl+Shift+End to select everything through the end of the document.
  4. Display the Home tab of the ribbon.
  5. Click the Sort tool in the Paragraph group. Word displays the Sort Text dialog box. (See Figure 1.)
  6. Figure 1. The Sort Text dialog box.

  7. Click on OK to accept the default settings in the dialog box.

Had you skipped the first two steps and performed the sort in any view besides Outline view, every paragraph would have been sorted alphabetically and therefore rearranged so that subordinate paragraphs would be separated from their headings. In other words, you would have a mess. However, in Outline view, the highest-level headings are sorted, bringing along the subordinate heading levels and body text.

If you wanted to sort by Heading 2 paragraphs, you should also use Outline view, but you would have to first select all the Heading 2 paragraphs subordinate to a particular Heading 1 paragraph and then sort. You will get the same results regardless of how many heading levels that you show on the Outline tab of the ribbon.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11238) applies to Microsoft Word 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Word here: Sorting by Headings.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Printing Color Separations with VBA

When printing in color (at a commercial printer) it is necessary to print different colors of your document in different ...

Discover More

Choosing an Insert Method for Pictures

The way that you choose to add pictures to your document can have an effect on the file size of those documents. It is ...

Discover More

Limiting which File Types You See in Drive

Overwhelmed with the number of files displayed on your screen when using Drive? Here's a handy way you can limit what is ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Sorting Dates Numerically

How you sort dates depends, in large part, on how they are formatted. This tip examines a very specific date format ...

Discover More

Alphabetizing By Last Name

Sorting lists of names by last name is easy if they are listed in a LAST, FIRST order. But what if the names are in FIRST ...

Discover More

Sorting a Text Selection

Word gives you the option to sort selected groups of text. You can do text, date or number sorts on whole paragraphs or ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven more than 6?

2017-11-30 15:56:18

Rebecca Zehr

Great, thanks!! But, Step 6 should say that you change the Sort by default from Paragraphs to Headings, otherwise you get an error.

Thanks for making my job so much easier!


2017-07-28 01:28:04

Jude from New Zealand

Allen... you walk on water! Fabulous. Made my 150 page document perfect. Thank you so much.


2017-07-05 10:43:23

Manju

Great tip. It was very useful. There are very few articles on this particular aspect and yours was to the point.


2016-11-20 18:01:58

Joe Gichuki

Thanks a lot. I knew I'd done this before. Don't know how I did but I just couldn't do it again. This has been a great help


2016-10-14 06:41:03

Bill Good

Some of the paragraphs under my headings had graphics. When I sorted, the headings came our in correct order. But every one of my graphics were gone. Suggestions?


2016-09-20 05:09:28

Emily Frain

Thank you Abdul. Have done that now


2016-09-19 05:14:50

Abdul Quadir

@Emily Frain

In Outline view, click the Show Level arrow (in the Outline Tools group) and choose Level 1 or Level 2.

This causes only Heading 1 or both Headings 1 and 2 to be displayed. The nested text should collapse.


2016-09-19 03:27:58

Emily Frain

Hi

Just tried to apply this to a document but the text doesn't collapse. It has several paragraphs to a heading and bullet points - is that the problem?


2016-09-17 08:05:03

Abdul Quadir

Great tip! Thanks a lot.


2016-09-17 07:44:20

Sameer patil

Will the document match print layout after working in outline view.
I would like to know more about working in master pages.
Nice tip,thanks.


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.