Thread: [Solved] Inserting table
View Single Post
 
Old 06-04-2014, 12:13 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Instead of that approach, what you need is something along the lines of:

Client Name: «Given_Name»«Family_Name»
{IF«Brother1» <> "" "Brother's name | Brother's Age
|«Brother1» | «Age1»|"}
{IF«Brother2» <> "" "|«Brother2» | «Age2»|"}
{IF«Brother3» <> "" "|«Brother3» | «Age3»|"}

where:
{IF«Brother1» <> "" "Brother's name | Brother's Age
|«Brother1» | «Age1»|"}
represents both the heading row and the first data row, followed by separate 1-row tables for each of:
{IF«Brother2» <> "" "|«Brother2» | «Age2»|"}
and
{IF«Brother3» <> "" "|«Brother3» | «Age3»|"}
and so on, up to the maximum number of rows needed. This will leave an empty paragraph between each row, but formatting can be used to minimise its appearance.

The alternative is to use as many separate complete tables as you need, embedded in nested fields like:

Client Name: «Given_Name»«Family_Name»
{IF«Brother3» <> "" "Brother's name | Brother's Age
|«Brother1» | «Age1»|
|«Brother2» | «Age2»|
|«Brother3» | «Age3»|" {IF«Brother2» <> "" "Brother's name | Brother's Age
|«Brother1» | «Age1»|
|«Brother2» | «Age2»|" {IF«Brother1» <> "" "Brother's name | Brother's Age
|«Brother1» | «Age1»|"}}}
In this case, there are three embedded tables.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote