View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Robert M. Franz (RMF) Robert M. Franz (RMF) is offline
external usenet poster
 
Posts: 1,741
Default Skip mail merge fields from Excel Workbook when blank/zero

Hi Akumudzi

akumudzi wrote:
[..]
In the letter, each filed is in its own row in a table. I've tried
using the "IF...Then...Else" condition for mail merge but it leaves a
space in the row when a field is blank/zero resulting in too may empty
rows in the letter.
I'm looking for a solution to taking only the fields I want from the
Excel sheet. Also, If there's a way to to automatically remove the
empty rows in the table when they're blank I'd finish of the solution
I'd started. Hope this makes sense.


I'm sure a VBA procedure could be written to run through the final
document (result of the merge to new document) and delete empty table rows.

Other than that, I think you're right, you cannot suppress the table row
-- unless you create a small 1-row table for each line and include this
whole table in the IF field. The macro solution sounds like less work to
me, even though I don't really know whether it takes much to recognize
an empty table row. Ask the gurus in the .vba groups if you need help
with that.

Greetinx
Robert
--
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word