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: Leading Spaces in Document File Names.

Leading Spaces in Document File Names

by Allen Wyatt
(last updated November 23, 2015)

5

Jo Ann would like to save Word documents using a space at the beginning of the file name. The leading space causes the file to be listed at the beginning of the Open dialog box, which Jo Ann finds helpful. However, she can't figure out how to get Word to pay attention to the desired space, as it is always automatically removed when she saves the file.

There are a couple of ways you can add the desired space. One 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.docx " MyFile.docx"

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 approach, 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 (11742) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word 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

Formatting an ASCII Table with Tabs

If you get a document from a coworker that has tabs used to line up tabular information, you might want to change that type ...

Discover More

Arranging Desktop Icons Automatically

Is your desktop getting messy, with icons strewn everywhere? One way to help manage the plethora of icons on your desktop is ...

Discover More

Excel Graphics and Charts (Special Offer)

Excel Graphics and Charts shows you how to add pizzazz to your worksheets. Another way to increase your proficiency ...

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)

Using Header Information as the Filename

Save a document for the first time, and Word helpfully suggests a filename you can use or change. If you want this suggested ...

Discover More

Converting to Word 6.0 Format

Need to convert your document to a really old format previously used in Word? The solution may already be built into the ...

Discover More

Saving Documents Using the Same Filename

When working on a document, you most often want to save your edits using the existing name of the document. If Word thinks ...

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 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 7 - 0?

2015-11-25 08:46:22

Cheryl L. Mozdrech

what is the purpose of opening a command line? I just saved another document using the quotes and it worked. I would still know the purpose of opening a command line first though. Please advise.


2015-11-25 08:37:34

Cheryl L. Mozdrech

I just used the command to have a file saved to the top of the directory. Do you really have to open up a command window? I copied and pasted the ren command, then opened up my document and saved the file using the quotes and it did work. Can't you just use the quotes directly using 'save as' in your document without opening a command line window?


2015-11-25 02:51:06

Arnaldo Carbone

would be an idea to put an underscore before the file name, e.g. to change, or better to save as, "my_file_name.doc" with/as "_my_file_name.doc"?


2015-11-23 18:27:22

Rick G.

A space at the start or end of a filename is going to lead to trouble sooner of later. They are easy to miss. It would be MUCH better to use other characters such as 0s, apostrophes, ... or the underscores, tildes, and exclamation points that Allen suggests.


2015-11-23 18:21:15

Fred Lanting

There is another way, and simpler, I think: Type a character (such as a period) and then whatever number of spaces you want, before the text you want to appear. Go back, highlight that period, and use Font Color to make it white.


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.