Results 1 to 2 of 2
2013-09-13, 17:42 #1
- Join Date
- Sep 2013
- Thanked 0 Times in 0 Posts
Insert table row on a non blank record.
The database program I am using can merge directly to a word document from an export that mimics a flat database file. Each row will have a unique identifier and then from 1 to 12 data fields filed out. for example the header would look something like this.
PRIMARY_KEY, ITEM_A_1, ITEM_A_2,...., ITEM_A_12, ITEM_B_1,... ,ITEM_B_12
If there are only 4 ITEM_X_X fields filled out then 5-12 will be blank. I want the final output for each record to look something like this.
ITEM_A_1 | ITEM_B_1
ITEM_A_2 | ITEM_B_2
PRIMARY_KEY will just appear at the top of each merge record. Each ITEM_A_X and ITEM_B_X needs to be in it's own row of a table that will also contain 30 blank columns. The problem is each page can only hold 4 table rows. If rows 5-12 are blank I don't want two pages of blank table rows to show up. Is there anyway to insert a table row only if the value isn't blank? I'd also like to add the table header in a row at the top of each page but I think I know how to do that if I can get the other part to work.
Hope that all makes sense. I'm using Office 2010 but some of the people who will need to use this may be on the latest version soon.
Thanks in advance.
2013-09-30, 18:36 #2
- Join Date
- May 2002
- Canberra, Australian Capital Territory, Australia
- Thanked 427 Times in 353 Posts
See: http://windowssecrets.com/forums/sho...merge-Tutorial - it's a Sticky thread at the top of this forum!Cheers,
[MS MVP - Word]