You have to use a format switch in the Word merge field, e.g. use Alt-F9 to
view the field codes, then change
{ MERGEFIELD Zip }
to
{ MERGEFIELD Zip \#"00000" }
for a 5-digit Zip. If you also have 9-digit Zip codes and Word sees them as
9-digit numbers (without a "-") then you should be able to use
{ IF { ={ MERGEFIELD Zip }-100000 } > 0
"{ MERGEFIELD Zip \#"00000'-'0000" }"
"{ MERGEFIELD Zip \#"00000" }" }
where all the {} are the special field code braces you can insert using
ctrl-F9
--
Peter Jamieson - Word MVP
This is giving me the literal 00000 in my merge. any other ideas?
> You have to use a format switch in the Word merge field, e.g. use Alt-F9 to
> view the field codes, then change
[quoted text clipped - 22 lines]
> > The merge in Word does not pick up this zero. How do I
> > get it to merge with the zero?
Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS - 13 Jan 2004 06:05 GMT
Hi Joseph,
The way in which Peter described is the way to do it.
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
> This is giving me the literal 00000 in my merge. any other ideas?
>
[quoted text clipped - 26 lines]
>> > The merge in Word does not pick up this zero. How do I
>> > get it to merge with the zero?
Peter Jamieson - 13 Jan 2004 08:29 GMT
If you have Zip codes that are blank or 0 and you want them to be completely
blank, then you need to add fields that test for blank/zero and insert
nothing. e.g. something like
{ IF { MERGEFIELD Zip } = "" ""
"{ IF { ={ MERGEFIELD Zip }-100000 } > 0
"{ MERGEFIELD Zip \#"00000'-'0000" }"
"{ MERGEFIELD Zip \#"00000" }" }" }
or
{ IF { MERGEFIELD Zip } = "0" ""
"{ IF { ={ MERGEFIELD Zip }-100000 } > 0
"{ MERGEFIELD Zip \#"00000'-'0000" }"
"{ MERGEFIELD Zip \#"00000" }" }" }
--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/
> This is giving me the literal 00000 in my merge. any other ideas?
>
[quoted text clipped - 26 lines]
> > > The merge in Word does not pick up this zero. How do I
> > > get it to merge with the zero?