OK, what goes wrong with the formatting when you do that? Is it to do with
horizontal layout (e.g. tabs), vertical layout (e.g. paragraph spacing) or
something else? If you define a paragraph style with the correct tabs etc.
and apply it to all the IF statements, does it make any difference.?
The only other reasonably simple way I can think of to solve this is to
create the data source you need, which may be possible if for example you
are using Access and are in a position to create your own queries, or if you
can issue the necessary SQL using Word VBA OpenDataSource. I'm not sure
exactly what might work in this case because tabs embedded in the SQL field
may not behave as you want, but for example you could try
SELECT lpi, iif(mytable.lpi = 0,'','Labwork Principal') AS `lpitext1` FROM
mytable
Then use
{ MERGEFIELD lpitext }{ IF { MERGEFIELD LPI } <> 0 " { TypeLab 6/3 }
{LPI}" "" }
in this case when LPI is 0 the IF statement should insert nothing, lpitext
should be blank, and so Word should suppress the line.
Peter Jamieson
> Thanks Peter,
> Have tried that but it messes up my formatting more . Thanks for your
[quoted text clipped - 87 lines]
>> >> > Thanks any help is appreciated.
>> >> > Paul