Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2004

Tip: Looking for answers? Try searching our database.

Printing zeros when PO Box is unavailable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Janiskdot - 05 Feb 2004 17:51 GMT
When I preview my letters using the mail merge wizard, I have 0's appearing when PO Box is unavailable.  I do not know how to get the wizard to allow me to skip a line in the address if the PO Box doesn't have something greater than 0.  I tried the If Then Else but how do I specifiy a blank line if a 0 is found?  My data source is in an Excel spreadsheet and is blank.
Peter Jamieson - 05 Feb 2004 19:42 GMT
> I tried the If Then Else but how do I specifiy a blank line if a 0 is found?

You can just put a paragraph mark (in the usual way) in the result, e.g.
instead of

{ IF { MERGEFIELD "PO Box" } = 0 "abc" "{ MERGEFIELD "PO Box" }" }

use

{ IF { MERGEFIELD "PO Box" } = 0 "
abc" "{ MERGEFIELD "PO Box" }" }

or whatever.

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

> When I preview my letters using the mail merge wizard, I have 0's appearing when PO Box is unavailable.  I do not know how to get the wizard
to allow me to skip a line in the address if the PO Box doesn't have
something greater than 0.  I tried the If Then Else but how do I specifiy a
blank line if a 0 is found?  My data source is in an Excel spreadsheet and
is blank.
Janiskdot - 05 Feb 2004 21:01 GMT
I still don't understand how this is to be done.  I can not see a difference between what you listed as something I might use and what you think I should use.  What does 'abc' stand for in your example?

What I need is

if PO BOX = 0 the
   print the next line (city,state,zip
els
   print PO BO
endi

Thank you for your response
Peter Jamieson - 05 Feb 2004 23:02 GMT
> I still don't understand how this is to be done.  I can not see a difference between what
> you listed as something I might use and what you think I should use.
> What does 'abc' stand for in your example?

Ignore the "abc" for now. Just remove it from the examples. The difference
between my two samples is that in one of them, the " after the 0 is the last
character of the first line, i.e. in Word there would be a paragraph mark
after it. But in any case...

> What I need is:
>
[quoted text clipped - 3 lines]
>     print PO BOX
>  endif

...suggests that you need something other than "how do I specifiy a blank
line if a 0 is found?", e.g.

{ IF { MERGEFIELD "PO Box" } = 0
"{ MERGEFIELD City }, { MERGEFIELD State } { MERGEFIELD Zip }"
"{ MERGEFIELD "PO Box" }" }

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

> I still don't understand how this is to be done.  I can not see a difference between what you listed as something I might use and what you
think I should use.  What does 'abc' stand for in your example?

> What I need is:
>
[quoted text clipped - 5 lines]
>
> Thank you for your response.
Janiskdot - 06 Feb 2004 15:06 GMT
I am so sorry to bother you again...

I tried the code you suggested but when I previewed the letters it just shows the code but doesn't execute it.  I do not know if I am suppose to put the code where I would normally 'insert' my fields, using the Mail Merge Wizard, or if there is some icon that I should use.

Thank you for your patience and your help.
Peter Jamieson - 06 Feb 2004 15:23 GMT
Use ctrl-F9 to insert the special field code braces {} and type everything
else using the usual keystrokes.

Use Alt-F9 to toggle between "field code" view and "field results view"

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

> I am so sorry to bother you again....
>
> I tried the code you suggested but when I previewed the letters it just shows the code but doesn't execute it.  I do not know if I am suppose to put
the code where I would normally 'insert' my fields, using the Mail Merge
Wizard, or if there is some icon that I should use.

> Thank you for your patience and your help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.