Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Leading Spaces in Document File Names.

Leading Spaces in Document File Names

Written by Allen Wyatt (last updated June 16, 2018)
This tip applies to Word 97, 2000, 2002, and 2003


1

Jo Ann noted that she used to be able to save a Word file with a space at the beginning of the file name. The leading space caused the file to be listed at the beginning of the Open dialog box, which suited her purposes quite well. She recently updated to Word 2003, and now it seems that Word no longer allows file names to begin with spaces; they are stripped out even when she purposely adds them.

It appears that the change is relative to how Word interacts with the underlying operating system. If you preface a file name with spaces, they are stripped out when the file is saved. There are a couple of ways you can get around this, however.

The first workaround is to rename the files using the command line in Windows. After you get out of Word, open a command line window, navigate to the folder where the file is saved, and then use a command such as the following:

ren MyFile.doc " MyFile.doc"

Note the use of the quote marks and space after the first quote mark. The result is a leading space in your renamed file. The space appears in front of the file name even when you next start Word.

It is the quote marks that make the operating system pay attention to the space. In fact, this leads right into the next workaround, which can be used from within Word: add quote marks to your file names. When you use Save As to save your file, surround the file name (including any leading spaces) with quote marks. Word then dutifully includes the spaces with the file name, rendering the desired result.

If, for some reason, you don't want to use quote marks in your file names, you can simply use a different character than a space to preface the names of files you want sorted at the beginning of your file list. Good candidates are underscores, tildes, and exclamation points.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (493) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Leading Spaces in Document File Names.

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

Updating to Smart Quotes

As you type a document, Word automatically converts your quote marks and apostrophes to "curly" versions that look more ...

Discover More

Counting Words

Do you need to know how many words are in a range of cells? Excel provides no intrinsic way to count the words, but you ...

Discover More

Macro, while Running, Stops Excel from Responding

When running a macro, have you ever seen Excel appear to stop responding? This can be frustrating, but there are a couple ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (menu)

MS-DOS with Line Breaks Format in Word 2002 and Word 2003

Finding the built in functionality in Word 2002 & 2003 for saving your document as a MS-DOS format.

Discover More

Opening a Document as Read-Only

Afraid of messing up an existing document by some changes you are considering? Consider opening the document as ...

Discover More

Saving Information in a Non-Document Text File

Need to store some information in a plain text file? It's easy to do when you use a macro.

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}] (all 7 characters, in the sequence shown) 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 2 + 2?

2018-06-16 20:18:35

Steve Wells

I just tested several special leading characters in file names to place them earliest in a folder for Windows 7 (and later). I can't speak to other operating systems. The following characters sort in this "alphabetical" order:
1 ( ) Space
2 (-) Hyphen
3 (!) Exclamation point
4 (_) Underscore
5 (~) Tilde
6 [The rest of the A-Z alphabet and numerals]*
7 (ο) [Some presentable Unicode character]

You may want to place a file or folder at the end (beyond Z) rather than at the beginning, preferably with a presentable looking leading character. My preference is a Cyrillic Small Letter O, Unicode 03BF (Decimal 0959), which looks like a hollow bullet; something like (o LastTemp). For readability, I like to place a space between the special leading character and the rest of the name, but you need not do that.
To place that character at the beginning of a file name, either within Word (SaveAs), or within a Windows folder (F2), place your cursor before any existing first character, hold the Alt key, type the decimal value 0959 on the keypad (not the number keys above the letter keys on the keyboard), and release the Alt key. You can omit the leading zero and just use "959".

*Remember when using numerals as the leading characters of file names, that each character is considered separately, not as a number value. So "12 Test.doc" comes before "2 Test.doc" keying on the first characters 1 and 2 rather than the value of 2 vs 12. A leading zero would place them in numeric order: "02 Test.doc" comes before "12 Test.doc".
With trailing numbers, a space may sort before nothing. Really!
Try "Test.doc", "Test1.doc", and "Test 1.doc". They sort in this order (thanks Microsoft!):
Test 1.doc
Test.doc
Test1.doc


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

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