Reply
 
Thread Tools Display Modes
  #1   Report Post  
nettedavid
 
Posts: n/a
Default How do I prevent non-breaking spaces or blank fields during a Mer.

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!
  #2   Report Post  
nettedavid
 
Posts: n/a
Default

I forgot to add the first part: Two of my fields a
{MERGEFIELD Client_1_Prefix}{MERGEFIELD Client_1_First \f " "}

"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!

  #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!



  #4   Report Post  
nettedavid
 
Posts: n/a
Default

Thanks, Graham. I tried both ways - but when I toggled the field codes to
see the data and then toggled back to view the field codes I lost the
conditional field codes that I put in. Is it supposed to do that? I have
several fields to put conditional formatting in and it appears as though I
can't check the data to see if it works without losing the codes.

"Graham Mayor" wrote:

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!




  #5   Report Post  
Graham Mayor
 
Posts: n/a
Default

ALT+F9 will toggle the display and yes some of the field construction
information will 'disappear' when you toggle back (though if you click the
ABC button on the merge toolbar
(http://www.gmayor.com/mail_merge_lab...th_word_xp.htm ) you can view
the resulting data and step through the records to ascertain if the result
is what you intended.

--

Graham Mayor - Word MVP

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





nettedavid wrote:
Thanks, Graham. I tried both ways - but when I toggled the field
codes to see the data and then toggled back to view the field codes I
lost the conditional field codes that I put in. Is it supposed to do
that? I have several fields to put conditional formatting in and it
appears as though I can't check the data to see if it works without
losing the codes.

"Graham Mayor" wrote:

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!





  #6   Report Post  
nettedavid
 
Posts: n/a
Default

It works now, thanks!

"Graham Mayor" wrote:

ALT+F9 will toggle the display and yes some of the field construction
information will 'disappear' when you toggle back (though if you click the
ABC button on the merge toolbar
(http://www.gmayor.com/mail_merge_lab...th_word_xp.htm ) you can view
the resulting data and step through the records to ascertain if the result
is what you intended.

--

Graham Mayor - Word MVP

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





nettedavid wrote:
Thanks, Graham. I tried both ways - but when I toggled the field
codes to see the data and then toggled back to view the field codes I
lost the conditional field codes that I put in. Is it supposed to do
that? I have several fields to put conditional formatting in and it
appears as though I can't check the data to see if it works without
losing the codes.

"Graham Mayor" wrote:

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!




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enter blank line spaces in pre-set forms? Marion Mailmerge 0 March 28th 05 01:21 PM
Blank Spaces in Top Margin rwelsh Page Layout 2 March 8th 05 07:59 PM
Blank spaces between tables in word Sal F Tables 1 March 8th 05 07:29 PM
how can I find with makro blank spaces Mario Krsnic Tables 3 March 3rd 05 08:40 AM
Blank spaces between rows Hélène Tables 9 February 1st 05 04:44 AM


All times are GMT +1. The time now is 03:31 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"