If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Suppress Blank Table Rows in Mail Merge
Hi Everyone
I have a mail merge document that contains a table with 5 rows of information and a number of columns. When the data is generated I may have from between 1 to 5 rows of information depending upon the data stored for each person. For those people that only have 1 row of non- blank information I get 4 blank lines in the middle of the letter. Is there anyway to dynamically resize the table to ignore these blanks data lines. I cannot change the source data as it will vary from 1 line of data to 5 lines of data for each person and given the volumes I do not which to do multiple runs. Any ides Brett |
#2
|
|||
|
|||
Hi Brett,
I hope this will help you out there is a SuppressBlankLines Property in Word VBA that you could use. Below is an example on how it works. Set myDoc = Documents.Open(Filename:="C:\Main.doc") with myDoc .SuppressBlankLines = True .Destination = WdSendToPrinter(or any of the other parameter i.e wdFormLetters) .Execute End With I hope this answers your question Good luck -Ralph- "Brett" wrote in message ... Hi Everyone I have a mail merge document that contains a table with 5 rows of information and a number of columns. When the data is generated I may have from between 1 to 5 rows of information depending upon the data stored for each person. For those people that only have 1 row of non- blank information I get 4 blank lines in the middle of the letter. Is there anyway to dynamically resize the table to ignore these blanks data lines. I cannot change the source data as it will vary from 1 line of data to 5 lines of data for each person and given the volumes I do not which to do multiple runs. Any ides Brett |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word-Excel 2003 - Mail Merge Recipients problem | Gabbi | Mailmerge | 4 | January 11th, 2005 04:11 AM |
Converting columns to rows for mail merge | Wes61 | General Discussion | 6 | July 21st, 2004 10:44 PM |
Mail merge blank pages | Wayne Parent | Mailmerge | 4 | June 21st, 2004 03:26 PM |
Populating mail merge doc with data from MSsql 2K table | Sydney Lotterby | Mailmerge | 4 | May 17th, 2004 08:03 PM |
suppress blank line in Mail merge Mergefield Condition | Sumesh | Mailmerge | 6 | May 14th, 2004 04:29 PM |