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: Maintaining Leading Zeroes.
Written by Allen Wyatt (last updated June 18, 2022)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021
Suzanne has an Excel worksheet containing addresses. The ZIP Codes are formatted via the special Excel formatting that maintains leading zeroes. However, when she uses mail merge in Word, the leading zeroes are dropped.
There are several ways you can approach this problem. You could, for instance, go into Excel and create a new column that contains text versions of the numeric ZIP Codes. Here's a handy Excel formula to use to accomplish this:
=RIGHT("00000" & A1, 5)
If you put this formula in a column that has been formatted as text (and the ZIP Code is in cell A1), you end up with text that contains the leading zeroes. You can then use this new column in your merge in Word.
If you don't want to edit the original Excel data, then you should stick with making your changes in the Word merge document. Take a look at the document; it contains merge fields that indicate where the merged data will be placed. These fields also indicate how the merged data should be treated. If you select the merge field for the ZIP Code, you can expand it by pressing Shift+F9. You should see the underlying code that makes up the field. You can then modify the field code so it looks similar to this:
{ MERGEFIELD "Zip" \# 00000-0000 }
The name within the quote marks ("Zip") may well be different; it represents the name of the column in the Excel worksheet that needs to be merged. The important part is to add the formatting switch (\#) followed by the pattern to be used for formatting the merged data. When you are done making the change to the field, you can press Shift+F9 again to collapse the field, and then do your merge.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9195) 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: Maintaining Leading Zeroes.
Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!
When creating a mail merge document, you use merge fields to indicate where the information from each record of your data ...
Discover MoreWord allows you to merge information into a document from various sources such as an Excel worksheet. If you do, you may ...
Discover MoreWord has a great mail merge capability. Inherent in this capability is the option to send your merged documents via ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments