Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. 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: Use Filenames That Sort Properly.

Use Filenames that Sort Properly

by Allen Wyatt
(last updated September 14, 2016)


It is not uncommon to work on projects that require several documents. For instance, you may be working on a manual that has several parts. When you are naming files for this project, you should use names that will later sort properly when you use various functions of Word.

For instance, when you choose to open a document, you see the standard Open dialog box that shows the files in the current directory. If your files are named properly, they will always appear in order on the list. I ensure this by starting all files related to a project with two digits that represent the order in which the document appears in the project. For instance, if the project entails an introduction, three sections, and an appendix, then the files may be named as follows:

01 Introduction.docx
02 Section 01.docx
03 Section 02.docx
04 Section 03.docx
05 Appendix.docx

Without the leading two digits, of course, the files would be displayed in the dialog box in an entirely different order. For me, the above approach ensures that the files are always in the logical order I need. The only drawback is that if I need to add a new section (such as Section 04), then I need to change the number of the 05 Appendix.docx file to 06 Appendix.docx so that the new section can become 05 Section 04.docx. This renaming is a small price to pay to keep my files in the desired order.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10840) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Use Filenames That Sort Properly.

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. ...


Automatically Sorting as You Enter Information

When entering information into a worksheet, you may want it to always be in a correctly sorted order. Excel allows you to ...

Discover More

Replacing Quoted Text with Italics

If you have text surrounded by quotes in a document, you may want to remove the quote marks and make the text that was within ...

Discover More

Filling a Range of Cells with Values

When writing a macro, you may want to fill a range of cells with different values. The easiest way to do this is to use ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Opening a Text File and Template from the Command Line

Word includes a command-line syntax that you can use to open files and do other operations. If you want to load a text file ...

Discover More

Making Backup Copies

When you save your documents, Word doesn't normally make backups of your files. If you want the program to do that, it takes ...

Discover More

Searching for a Document

When switching from one version of Word to another it can be confusing to figure out where all the commands and features are ...

Discover More

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

View most recent newsletter.


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 8Mpixels. 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 0 + 7?

2016-09-15 15:06:42

Al Lowe

For files that you want to keep in chronological order, you can use this format: YYYYMMDD (and even HHMMSS, if needed). This sorts into chrono order.

I do this so much that I created a macro and assigned it to Alt-Shift-y. Here it is: 20160915

2016-09-15 10:14:10


I use the yyyy/mm/dd too or 1xxx

2016-09-14 19:43:35

Ron Alan

If I insert a section between 04 and 05 I call it 04a

2016-09-14 16:20:21

Bob M.

The Year-Month-Day-Other convention quickly becomes obvious to anyone that needs to sort by date. So much so, that I’m surprised it hasn’t become universally accepted in the written form as well. Is 05/12/15 May 12th, or December 5th? I hate the 12MAY15 convention! I am hereby starting the Year-Month-Day movement! Everyone get on board!

2016-09-14 12:23:57

Chuck Bagby

To keep files in order, I place a reverse date at the beginning of my files and then add a letter if needed for multiple files with the same name. September 14, 2016 would be 160914a_Name of file.

2016-09-14 11:30:18


I have a bunch of reports I run throughout the week and month. I always use a naming convention of YYYY-MM-DD. This way the files will always be sorted by date when using the name sort.

2016-09-14 11:28:18


I name files A filename.docx, B filename.docx,C filename.docx ... and any insertion of a new files can then be, for example Ba filename.docx, Bb filename.docx ... nested to infinity.

2016-09-14 10:50:22


Incrementing by 10 when beginning to name files is one good idea. Changing the leading zero to a letter, such as "A" for the intro, "B" for the document sections, and "C" for the appendices and index would be another.

Another area is dates. If the date is written in the standard manner the files will not sort in chronological order. This applies even if the month is spelled-out, either long or short form. Having the year at the end of the date doesn't help matters. A company I worked for years ago had a numbering scheme for purchase orders. They would only order from a given manufacturer once per day. This allowed the PO number to be the date. To avoid issues with the change in century they put the year first e.g., 2016-0914. Using this data format will always sort files chronologically by year, then month, and finally day.

The point is develop a scheme that organizes files in a way that will sort in the correct order based on the methods used by Microsoft (yes, assuming an IBM based computer).

2016-09-14 10:21:03

Andrew Evans

A tip I used when programming in COBOL which required line numbers is when you start increment by 10 - allowing you to add in between existing lines. In your example the sections would 10, 20, 30, 40 and 50, no renaming required when you add a section or two.

2016-09-14 09:25:06


A way around having to rename the files is to use 04a, 04b, etc.

2016-09-14 09:00:22

Alison Miller

I've been using this method for years. I use it for Agendas and Minutes from committees I sit on. Makes life so much easier. However, if I have to add something inbetween, I just make it 01.1 for example. It still sorts properly. Then I don't have to change the names of the subsequent documents.

2016-09-14 08:37:31

Nelson Phillips

Great idea but rather than put up with that "... small price to pay ...", change the Appendix number by using a "1" or a "2" to replace the "0" as the first of the two digit.

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

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.