{"id":1195,"date":"2011-05-05T14:50:57","date_gmt":"2011-05-05T13:50:57","guid":{"rendered":"http:\/\/www.galhano.com\/blog\/?p=1195"},"modified":"2011-06-07T10:41:38","modified_gmt":"2011-06-07T09:41:38","slug":"merge-field-formatting-in-microsoft-word","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=1195","title":{"rendered":"Merge Field Formatting in Microsoft Word"},"content":{"rendered":"<p>Seems like ever since version 2002\/XP, formatting just isn&#8217;t right in mail  merges anymore. A few of the problems that are caused:<\/p>\n<ul>\n<li>Leading zeroes are dropped from zip codes<\/li>\n<li>Currency doesn&#8217;t show up with a dollar sign and two decimals<\/li>\n<li>Dates come out wrong<\/li>\n<\/ul>\n<p><!--more-->Here&#8217;s the key. Our sample data source (in Excel) looks like this:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.officearticles.com\/word\/images\/merge_1.gif\" border=\"0\" alt=\"\" width=\"544\" height=\"80\" \/><\/p>\n<p>Create your mail merge normally and preview one of the records. If the field  doesn&#8217;t come out right, then turn on viewing of your fields codes. This is most  easily done by hitting Alt+F9 (it&#8217;s a toggle, so hit Alt+F9 to turn off again  later). Then, a zip code merge field will look like this.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.officearticles.com\/word\/images\/merge_2.gif\" border=\"0\" alt=\"\" width=\"442\" height=\"240\" \/><\/p>\n<p align=\"left\">Note that the zip code has lost its leading zeroes, and the  currency has lost it&#8217;s dollar sign. The date seems okay, but maybe we want it to  appear as  June 15, 2005 instead. So let&#8217;s see how it&#8217;s done.<\/p>\n<p align=\"left\">Hit Alt+F9 or go to Tools<span style=\"font-family: Wingdings;\">\u00e0<\/span>Options<span style=\"font-family: Wingdings;\">\u00e0<\/span>View  tab and turn on viewing of Field Codes. The same document now displays as  follows. I&#8217;ve widened the table cells so the fields are easier for us to read  here.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.officearticles.com\/word\/images\/merge_3.gif\" border=\"0\" alt=\"\" width=\"461\" height=\"218\" \/><\/p>\n<p align=\"left\">Now edit those field codes to read as shown in the next graphic.  I&#8217;ve changed the font so it&#8217;s more easy to read the text in the merge fields.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.officearticles.com\/word\/images\/merge_4.gif\" border=\"0\" alt=\"\" width=\"659\" height=\"227\" \/><\/p>\n<p align=\"left\">The result is quite a bit different.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.officearticles.com\/word\/images\/merge_5.gif\" border=\"0\" alt=\"\" width=\"436\" height=\"222\" \/><\/p>\n<p align=\"left\">Great information about merge field codes can be found at:<\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/support.softartisans.com\/WordWriterV1\/doc\/features\/format.asp\"> http:\/\/support.softartisans.com\/WordWriterV1\/doc\/features\/format.asp<\/a><\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/www.gmayor.com\/formatting_word_fields.htm\"> http:\/\/www.gmayor.com\/formatting_word_fields.htm<\/a><\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/homepage.swissonline.ch\/cindymeister\/MergItem.htm#FormatMergeResult\"> http:\/\/homepage.swissonline.ch\/cindymeister\/MergItem.htm#FormatMergeResult<\/a><\/p>\n<p style=\"text-align: left;\">http:\/\/www.officearticles.com\/word\/merge_field_formatting_in_microsoft_word.htm<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Seems like ever since version 2002\/XP, formatting just isn&#8217;t right in mail merges anymore. A few of the problems that are caused: Leading zeroes are dropped from zip codes Currency doesn&#8217;t show up with a dollar sign and two decimals Dates come out wrong<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"close","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-1195","post","type-post","status-publish","format-standard","hentry","category-microsoft","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1195"}],"version-history":[{"count":4,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1195\/revisions"}],"predecessor-version":[{"id":1197,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1195\/revisions\/1197"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1195"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}