View Single Post
  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Deleting a blank line in mail merge

information to fill in the next work code isn't there an IF that can be
written or something like that


If all your data is coming from the same record in the data source, what you
need is something like

{ IF "{ MERGEFIELD proposaldetail_work_code2 }" = "xxxxx" ""
"{ MERGEFIELD proposaldetail_what }
{ MERGEFIELD proposaldetail_work_code2 } { MERGEFIELD
proposaldetail_description2 }
{ MERGEFIELD workcode_description2 }
{ MERGEFIELD proposaldetail_price2 }" }

and the same for all the other work codes. I'm assuming there is a value
"xxxxx" that the Work code has when you do not have a work code. Perhaps it
is "".

{ MERGEFIELD proposaldetail_what } is the same thing as
«proposaldetail_work_code2» except with the "underlying field codes
displayed" e.g. using Alt-F9, and the {} are all the special "field code
braces" that you can enter using ctrl-F9


--
Peter Jamieson
http://tips.pjmsn.me.uk

"anjw38" wrote in message
...
Here is an example of what the doc looks like. Now if there is no
information to fill in the next work code isn't there an IF that can be
written or something like that
«proposaldetail_work_code»-«proposaldetail_description»
«workcode_description»
«proposaldetail_price»

«proposaldetail_what»
«proposaldetail_work_code2» «proposaldetail_description2»
«workcode_description2»
«proposaldetail_price2»

«proposaldetail_what2»
«proposaldetail_work_code3» «proposaldetail_description3»
«workcode_description3»
«proposaldetail_price3»

«proposaldetail_what3»
«proposaldetail_work_code4» «proposaldetail_description4»
«workcode_description4»
«proposaldetail_price4»

«proposaldetail_what4»
«proposaldetail_work_code5» «proposaldetail_description5»
«workcode_description5»
«proposaldetail_price5»

«proposaldetail_what5»
«proposaldetail_work_code6» «proposaldetail_description6»
«workcode_description6»
«proposaldetail_price6»

etc etc up to code15

Thank you anyone for any help. I feel like I'm right on the verge of
solving this, but just need that little extra piece of info.

"anjw38" wrote:

I am not sure I understand what you mean. Let me explain a little more.

We are sending out a letter to each of our customers. Each customer has
recommended services that should be preformed in the coming year. Each
customer has a different amount of recommended services. ie. some have 6
some have 3 some have 15. The doc is set up for the max (15). Is there
a
way of removing the extra 12 lines if a customer only has 3 recommended
services on their proposal? All the information is being merged in from
an
excel worksheet. I am working in Office 2003. Thanks for any help you
can
provide. I'm pretty literate but if you use too many big words I go on
temporary vacation. :-)



"anjw38" wrote:

I know I've seen the answer to this before the first time I researched
it,
but can't seem to find it now. It was a macro.

I am doing a document for several customers with personal information
being
imported for each customer. Each customer has a different amount of
suggested services. How do I get the blank suggested services to
delete from
the document?