Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. 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: Using Header Information as the Filename.

Using Header Information as the Filename

Written by Allen Wyatt (last updated December 2, 2023)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021


1

When a Word document is first saved, it uses the first few words of the document as a default filename. Paul would like to have Word use the header information as the default filename instead.

Unfortunately there is no way to instruct Word to use header information by default, but there may be a workaround you can attempt. First, though, a clarification: Word doesn't actually default to using the first few words of the document as the filename. The first choice for Word is actually whatever title you've specified in the Properties for the file. Only if no title is specified will Word fall back to using the wording from the first paragraph.

The fact that Word uses the title in the file properties raises a very interesting possibility, which is the basis for a potential workaround. If you can make sure the user specifies a title, you can use that title as the filename and you can also use the same title (through the use of a field) in the header. Thus, your title, your header, and your filename all could easily be the same, just by setting the title property before you actually save the file.

If you are unsure of a user's ability to remember to specify a title property, you could always create a macro that would set the property for them. The macro could run when the document is first created (if it is stored in the template on which the document is based) and could prompt the user for a title. The title is then stored in the properties where it kicks into play when the document is subsequently saved. The macro could also set the header for the document based on the user input, or it could include a TITLE field to dynamically include the title property in the header.

Another approach using a macro is to create one that is run just before saving the document. If this is the first time it is being saved, the macro would extract the existing information from the header and use it for the suggested filename. You could even name the macro FileSaveAs, which means it would replace the existing Save As command.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10585) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Word here: Using Header Information as the Filename.

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

Mixing Column Formats On a Page

Want to switch the number of columns used for your text, in the middle of a page? You can do this very easily by ...

Discover More

Determining Font Formatting

If you need to determine the font applied to a particular cell, you’ll need to use a macro. This tip presents several ...

Discover More

Formatting Issues with Indexing Levels

When you insert an index in a document, Word automatically takes care of formatting that index. What if the index levels ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Combining Word Documents

At some point you may want to insert one Word document inside another Word document. An easy way to do this is to use the ...

Discover More

Periodically Delete TMP Files

After using Word for a while, you may notice some "litter" of unused files on your hard drive. This tip explains how ...

Discover More

Formatting Text in Custom Document Properties

Word allows you to create custom document properties that stay with a document and can be inserted through the use of ...

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 two more than 7?

2024-01-18 02:17:48

Meredith Gurr

Hello from Australia, Allen.

I successfully use the Title document property for the beginning of a filename in Word 365 templates to make it easy for users.

However, I'd also like to do the same for templates in Excel 365, but it doesn't follow the same convention, with the template filename (plus Sheet1, etc.) being used, even with the Title document property set to what's needed.

Is there a way to get Excel 365 to use the same convention as Word 365, preferably without macros or other programming (trying to avoid this for security and succession plan reasons)?

Thanks in advance for your assistance.


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.

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.