Know Your ABC’s (Office 12 Coolness, Part 3)


One of the features I always wished Word had was the ability to alphabetize a
list of words.  I always copied my words into Excel, fixed them up one per
row, sorted them there, and then pasted back into Word.  Imagine my surprise when I discovered that Word has had
this feature since version 2.0!

Formerly a hidden gem on the Table menu, most people think of the Sort
command to sort rows or columns within Word tables.  The secret is that,
despite being on the Table menu, the Sort command works just fine without a table.

In Office 12, we’ve added this feature to the Paragraph chunk on the Write
tab–and you can use it to sort part of your document very quickly.



The “Sort” command in the Word 12 “Write” tab

By default, the Sort feature sorts by “paragraph,” although this isn’t as
limiting as it sounds.  If you type a list of words and press Enter after
each one, every word is its own “paragraph.”  Similarly, a bulleted or
numbered list has each item stored as a separate paragraph, so Sort does exactly
what you’d expect here as well.

To use the feature, simply select the text you want to sort, click the Sort
button, and voila, alphabetized text.  You can also sort by number or date
if that is more useful for what you’re doing.

This is an example of how a simple reorganization of feature placement makes
all the difference; I never thought about using Sort in Word because I thought
it was for tables only.  Now, we’ve moved it to a more logical,
discoverable position in the Office 12 Ribbon, and we’ve started to receive a
lot of nice mail from people just discovering it for the first time.  (They
usually think it’s a new feature!)

No need to copy your text into Excel anymore for simple sorting–you can do
it right from within Word.  No table required.  Office 12 makes it easy.

Comments (16)

  1. Andrey Petrov says:

    I also thought it was for tables only… Great!

  2. pli says:

    This is indeed a great example of a hidden gem.

    However, I often type in a list of comma-separated list of people’s names, and want to have the list sorted. I haven’t found an easy way to do that yet, even if I drill into the Options dialog box.

    For Chinese language users, it will also be useful to have an option to sort by Chinese Pinyin, or by number of strokes in the first character.

    By the way, I really enjoy your blog. Thanks very much.

  3. Keeron Modi says:

    wow ! Thanks Jensen for keeping on posting these regular updates and bringing out the new features.

    Like most of the users, I also thought it was for tables – good to know it can do paragraphs and words. Guess there 100s of more features from the 1500+ that we aren’t aware of (and that the Ribbon will help us). Exciting stuff!!

  4. Matthew Pass says:

    First of all, I am absolutely *loving* this blog. Thanks so much, Jensen.

    Anyway, pli said ‘even if I drill into the Options dialog box,’ which reminds me… I can’t wait until we get to hear about any reworkings of the Office Tools | Options dialogs. Outlook in particular has just got *so* unwieldly.

    Thing is, I’ve been scratching my head for a while to come up with a better solution for it, so I’m really interested to see what the ’12 team have up their sleeves for that little beauty…

  5. ChrisC says:

    pli wrote:

    > I often type in a list of comma-separated list of people’s names, and want to have the list sorted. I haven’t found an easy way to do that yet

    There’s a fairly simple way to do this.

    1) Select the comma delimited list

    2) Open the replace dialog box (menu or [CTRL+H])

    2a) In "find what" put a comma

    2b) In "replace with" put "^p" (the code for a paragraph mark)

    2c) Press "Replace All"

    2d) Answer "No" to ‘check remainder of document’

    3) Use the "Sort" feature

    4) Use the replace dialog box again (reversing the find/replace characters)

    5) Ta-da! Sorted, comma separated list of items

    HTH

  6. Rob says:

    Great post. Do you guys have a summary of all the previously buried commands that will now resurface?

  7. tzagotta says:

    I wish Visual Studio could do this in its code editor. Nice feature.

  8. Pity though, if you build an outline of bullets Office 2003 can’t sort it:

    -A

    –D

    –B

    -C

    -B

    becomes:

    -A

    –B

    -B

    -C

    –D

    instead of:

    -A

    –B

    –D

    -B

    -C

    Still, I always wondered why it was listed on the Table Menu and yet the default selection always seemed to be sort by paragraph.

  9. TC says:

    I always though of this the other way round. I knew that it would sort any text, so I always thought: "Why did they put this in the /Tables/ menu?"

  10. John C. Kirk says:

    This isn’t directly relevant, but I came across a related issue the other day. A friend of mine is constructing an index in a Word document that contains references to various Bible verses. The problem he’s found is that numbers get treated as letters, so "Psalms 13:7" would come before "Psalms 4:1" rather than after it.

    Is there a handy URL/email address that I could use to request changes like this for the next version of Office?

  11. ChrisC says:

    John: There is a work around

    > numbers get treated as letters, so "Psalms 13:7" is before "Psalms 4:1"

    > rather than after it

    You can tell your friend that there is a work-around: add a space before the 4.

    S/he will probably only want this to happen in the index itself. To do this change the options to ‘show formatting’ and you will see something like this:

    Psalms 4:1 { XE "Psalms 4:1"}

    Change the [space]4:

    to a [space][space]4:

    You can use the find/replace for this.

    Now go to the index and click within it, then press [F9] to update it – now the entries will be ordered as desired.

    NOTE:

    1) His/her index will contain ‘Psalms[space][space]4:1’

    instead of ‘Psalms[space]4:1’

    2) The best time to do this is when the document is complete (you’ll have to do 1-9 not just the 4s)

    3) Don’t leave out the leading space or the backslash colon if you use find/replace dialog

    (you don’t want "Luke 24:26 changed to "Luke 2 4:26")

    HTH

    PS

    Note 4) Your browser will resolve two consecutive spaces into one – that’s why I used "[space]" in place of " " in this post in some places (but did not need to in note#3)

  12. Rolando says:

    To John C. Kirk :

    Maybe Word uses the same APIs as Windows Explorer does. Check this Michael Kaplan’s post:

    http://blogs.msdn.com/michkap/archive/2005/01/05/346933.aspx

  13. John C. Kirk says:

    Chris: thanks for the suggestion. The "extra spaces" workaround didn’t work, but a related one did – we formatted the numbers to all have the same number of digits (i.e. added leading zeros), then changed the text colour of those extra zeros to white (effectively invisible) and changed their character spacing to 1% (to get rid of the gap).

    Rolando: my understanding is that the index is sorted on a word-by-word basis, not just character-by-character, so it would make sense (to me) to say that if a "word" only contains digits then it should be sorted differently. I realise that mixed words (e.g. "1st") would be a bit more tricky.

  14. Chris_Pratley says:

    pli: Word supports sorting Chinese using stroke or phonetic order. In the Sort dialog, choose options, and switch the language to the flavor of Chinese you are sorting. Ok, then pick the sort type (phonetic, etc.)

  15. Chris C. says:

    John:

    You’re welcome, I’m glad I inspired.

    I followed my own instructions before posting and it worked for me (MS Word 2002 [v10.] with SP3), sooo I’m not sure what’s wrong.

    I recommend trying it again, HERE’S WHY:

    some printers will print white text as black text (mostly limited to black/white laser printers).

    If the document consumers will not be printing it just ignore. But if they do, and their printer does… that 1% spacing will be interesting to see 🙂

    I’m happy to continue the thread if jenson allows it. (he can halt the thread) Post your version number/results you get if you like (i.e. do you see ‘[space][space]4’ in your recreated index?).

    If s/he is just printing for a church and then photocopying, then the solution you reached is certainly good enough.

    Best wishes,

    -Chris C.