View Single Post
  #3   Report Post  
Graham Mayor
 
Posts: n/a
Default

A couple of issues here - you need to toggle the field code to add switches
so assuming yours is correct (and I haven't checked) then the correct syntax
would be {Mergefield Client_1_FirstName \b " " } Toggle back and the display
should be «Client_1_FirstName»

Personally I prefer to use the brute force method of conditional fields to
insert data and the associated spaces or line feeds

{IF{Mergefield Client_1_FirstName} "" "
{Mergefield Client_1_FirstName} "}{Mergefield Client_1_LastName}

Here the construction checks for content and if there is any it moves down a
line and inserts first name and a space. The lastnamke field follows
immediately without a space. This method is easy to adapt to your
requirements and better still you can see what is happening and why. Use
CTRL+F9 to insert field boundaries {} when building the conditional fields
manually.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




nettedavid wrote:
When I toggle my field codes to view my data during a mail merge
using a Word table data source, I receive blank lines where there are
empty fields. The data comes from an Excel spreadsheet (which can't
be used as a data source because of our document management program),
and each piece of data is a separate field. I've tried using \b and
\f switches to add space if the next field has data, but when I
toggle the codes the switches disappear. How can I prevent the
empty field spaces? An example of a switch would be:
«Client_1_FirstName \b " " ». Do I have the syntax wrong? Any help
would be greatly appreciated. Thanks!