Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] limbikani@gmail.com is offline
external usenet poster
 
Posts: 1
Default Skip mail merge fields from Excel when blank/zero

I am creating mail merge letters (pay-slips) in Word 2003 from a list
of about 300 employee records in Excel.

The list has 28 fields and some of the values in some of the fields in
the workbook are blank or zero.

What I need is that, when a value is blank or zero, then that field
(both field name and value) dosen't show at all on the letter so as to
make each pay slip contain only data that is non-zero and therefore
relevant to its recipient. E.g. if the 'Overtime' field for a record is
blank/zero (meaning this employee does ont receive overtime) then that
field doesnt even show on the letter.

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.


Thanks in advance

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Skip mail merge fields from Excel when blank/zero

See response in vba.beginners newsgroup. Please do not post the same
question separately to multiple newsgroups.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

wrote in message
oups.com...
I am creating mail merge letters (pay-slips) in Word 2003 from a list
of about 300 employee records in Excel.

The list has 28 fields and some of the values in some of the fields in
the workbook are blank or zero.

What I need is that, when a value is blank or zero, then that field
(both field name and value) dosen't show at all on the letter so as to
make each pay slip contain only data that is non-zero and therefore
relevant to its recipient. E.g. if the 'Overtime' field for a record is
blank/zero (meaning this employee does ont receive overtime) then that
field doesnt even show on the letter.

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.


Thanks in advance



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I mail merge to EMAIL from MS Word AND add a pdf attachment Lily@Insight Mailmerge 24 January 15th 07 09:33 PM
Can Mail Merge include a space at the beginning of a field? Joshua Mailmerge 5 April 13th 06 06:37 AM
mail merge with word 2003 ken sunshine New Users 5 March 23rd 06 05:01 PM
How to get all mail merge fields in a document [email protected] Mailmerge 3 February 17th 06 05:43 AM
Mail Merge Issue With Office 97 - Excel Data Source Matt Thorley Mailmerge 1 February 15th 05 11:38 PM


All times are GMT +1. The time now is 12:11 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"