Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / April 2005

Tip: Looking for answers? Try searching our database.

How do I prevent non-breaking spaces or blank fields during a Mer.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nettedavid - 05 Apr 2005 19:39 GMT
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!
nettedavid - 05 Apr 2005 20:09 GMT
I forgot to add the first part: Two of my fields are:
{MERGEFIELD Client_1_Prefix}{MERGEFIELD Client_1_First \f " "}

> 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
[quoted text clipped - 5 lines]
> «Client_1_FirstName \b " " ».  Do I have the syntax wrong? Any help would be
> greatly appreciated.  Thanks!
Graham Mayor - 06 Apr 2005 12:48 GMT
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.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> 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
[quoted text clipped - 6 lines]
> ?Client_1_FirstName \b " " ?.  Do I have the syntax wrong? Any help
> would be greatly appreciated.  Thanks!
nettedavid - 06 Apr 2005 13:31 GMT
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.

> 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
[quoted text clipped - 24 lines]
> > «Client_1_FirstName \b " " ».  Do I have the syntax wrong? Any help
> > would be greatly appreciated.  Thanks!
Graham Mayor - 06 Apr 2005 15:51 GMT
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_labels_with_word_xp.htm  ) you can view
the resulting data and step through the records to ascertain if the result
is what you intended.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> 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
[quoted text clipped - 39 lines]
>>> ?Client_1_FirstName \b " " ?.  Do I have the syntax wrong? Any help
>>> would be greatly appreciated.  Thanks!
nettedavid - 06 Apr 2005 19:11 GMT
It works now, thanks!

> 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
[quoted text clipped - 46 lines]
> >>> «Client_1_FirstName \b " " ».  Do I have the syntax wrong? Any help
> >>> would be greatly appreciated.  Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.