Zipcode not Valid! Error

E

Ernie D

Does any one have any Idea on how to programmatically
check for the Message "Zipcode not Valid!" ?
and stop it from printing any bar code ?
I am merging in information using a Book mark.
Generally most of the addresses will come in correct ,
but occasionally I get a foreign zip code or an APO, this
will cause the above message
I have made several attempts to use a formula like
{ IF { BARCODE ENV_ZIPCODE1 \b\* MERGEFORMAT }
<> "Zipcode not valid!" "{ BARCODE ENV_ZIPCODE1 \b\*
MERGEFORMAT }" ""
}
Or will the post office accept all 9's in the bar code
for those bad zip codes! ;-)
Any Help would be greatly appreciated!
Thanks
E
 
C

Cindy M -WordMVP-

Hi Ernie,
Does any one have any Idea on how to programmatically
check for the Message "Zipcode not Valid!" ?
and stop it from printing any bar code ?
I am merging in information using a Book mark.
Generally most of the addresses will come in correct ,
but occasionally I get a foreign zip code or an APO, this
will cause the above message
I have made several attempts to use a formula like
{ IF { BARCODE ENV_ZIPCODE1 \b\* MERGEFORMAT }
<> "Zipcode not valid!" "{ BARCODE ENV_ZIPCODE1 \b\*
MERGEFORMAT }" ""
}
Or will the post office accept all 9's in the bar code
for those bad zip codes! ;-)
What result do you get with the IF field? Have you tried
putting the Barcode field on the left of the comparison in
"quotes", as well? Sometimes that helps an IF field evaluate
more as you'd expect.

Why are you using a bookmark instead of putting the
mergefields into the Barcode field? Is there some way you
could check the content of a mergefield (country, for
example), whether it would be valid as a zipcode?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
C

Charles Kenyon

I try to avoid bookmarks when merging as a merge result document containing
multiple records can only have one bookmark. Put in the merge field for the
zip code instead.

In trying to code around similar error messages with a docproperty field, I
did the following:
1) Put together a field that generates the error message.
2) Unlink that field so I have the error message as text.
3) Use that text as the test text in the IF field.
4) As Cindy suggests, put both sides in quotation marks. When using
bookmarks I never simply use the bookmark - even though that is how you are
supposed to do it - I use a ref field with the bookmark name in quotation
marks.

Look into instructions on skipping whole lines when a field is blank. You
could add that coding here and it would at least work when the postal code
field was blank.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top