It can be very useful to sort by headings when you have lots of headings in your document. You can sort on paragraphs that employ the Heading 1 style for instance.
Follow the steps below to learn how:
Make sure you are in Outline view by clicking on the Outline view button that is at the right side of your status bar.
Using the controls on the Outlining tab of your ruler in Word 2007, collapse the headings so that only the first level headings are visible. This is not absolutely necessary but it will make your screen a bit easier to read.
Place your cursor at the beginning of the first heading and click CTRL + Shift + End to select everything through the end of your document.
Select Sort from the Home tab of your Ribbon and then click the Sort tool in the Paragraph group.
Click OK to accept the default settings in the dialog box.
If you skipped the first two steps and performed your sort in any view other than Outline, every paragraph would have been sorted alphabetically and rearranged so that your subordinate paragraphs would be separated from their headings, which would be a huge mess. In outline view however, the highest level headings are sorted, bringing along the subordinate heading levels and body text.
If you would like to sort by Heading 2 paragraphs, you should also use Outline view, but you would have to first select all the heading two paragraphs subordinate to a particular heading 1 paragraph and then sort. You will receive the same results regardless of how many heading levels you show on your Outline toolbar.