Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter blank line spaces in pre-set forms? | Mailmerge | |||
Blank Spaces in Top Margin | Page Layout | |||
Blank spaces between tables in word | Tables | |||
how can I find with makro blank spaces | Tables | |||
Blank spaces between rows | Tables |