Getting Preceding Zeros to Print in an ID field when Performing a Word Mail Merge

It is very easy to use the Custom dialog box in Microsoft Excel to add preceding zeros to a number, such as a University ID number, for example, to make it 10 digits. However, these zeros may be lost when using this field in a Word mail merge. To solve this problem, here is what you can do:

In Microsoft Word, set up the main document and data source in the normal way, placing the UniversityID field in the Word document. Right click the UniversityID field. Choose “Toggle Field Codes.” Change the {MERGEFIELD UniversityID} to read {MERGEFIELD UniversityID\#”0000000000″}. These 10 zeros indicate that the number must be 10 digits. Right click again and choose “Update Field.” Then click “Preview Results” on the Ribbon.

Now when you perform the mail merge, the zeros should appear in the merged document(s).

(Special thanks to April Law for contributing to this article). 

Leave a Reply

Your email address will not be published. Required fields are marked *