Removing carriage return in Word Mail Merge

I am trying to create a table using mail merge. Each row of the table is created by a different set if/then/else statements. I am unable to remove the carriage return between the rows. Can someone please tell me how to remove the carriage returns? I can not simply delete the carriage returns. They are fixed!


Below is my mail merge code in Word 2010 (

{ IF { MERGEFIELD T1_XYX } = "grp1" "" {IF { MERGEFIELD T1_XYX } = "grp3" "" {IF { MERGEFIELD T1_XYX } = "grp6" "" {IF { MERGEFIELD T1_XYX } = "" "" "

 {MERGEFIELD T1_First_Name }     { MERGEFIELD T1_Last_Name }   { MERGEFIELD T1_XYX }
"}}}  { IF { MERGEFIELD T2_XYX } = "grp1" "" {IF { MERGEFIELD T2_XYX } = "grp3" "" {IF { MERGEFIELD T2_XYX } = "grp6" "" {IF { MERGEFIELD T2_XYX } = "" "" "
 {MERGEFIELD T2_First_Name }     { MERGEFIELD T2_Last_Name }   { MERGEFIELD T2_XYX }
"}}} { IF { MERGEFIELD T3_XYX } = "grp1" "" {IF { MERGEFIELD T3_XYX } = "grp3" "" {IF { MERGEFIELD T3_XYX } = "grp6" "" {IF { MERGEFIELD T3_XYX } = "" "" "
 {MERGEFIELD T3_First_Name }     { MERGEFIELD T3_Last_Name }   { MERGEFIELD T3_XYX }
"}}} { IF { MERGEFIELD T4_XYX } = "grp1" "" {IF { MERGEFIELD T4_XYX } = "grp3" "" {IF { MERGEFIELD T4_XYX } = "grp6" "" {IF { MERGEFIELD T4_XYX } = "" "" "
 {MERGEFIELD T4_First_Name }     { MERGEFIELD T4_Last_Name }   { MERGEFIELD T4_XYX }
"}}}

Below is my Excel file that I'm merging with the Word doc.

T1_First_Name T1_Last_Name T1_XYX T2_First_Name T2_Last_Name T2_XYX T3_First_Name T3_Last_Name T3_XYX T4_First_Name T4_Last_Name T4_XYX
Fred Flinstone grp4 Wilma Flinstone grp3 Pebbles Flinstone grp4 Dino Flinstone grp5
Barney Rubble grp2 Betty Rubble grp4 BamBam Rubble grp1      
Betty Green grp5                  

Below is what the merged file looks like in preview


Fred Flinstone grp4

Pebbles Flinstone grp4

Dino Flinstone grp5

When I turn the "show formatting symbols" ON I see there are carriage returns between the rows but Word will not let me delete them. How do I reformat so there are no spaces in between the rows???

Thank you.

Answer
Answer

If you are trying to crate a table in mail merge from different records, then that would be a many to one merge, which is something that mail merge does not do readily. You may be able to achgieve your aims using the instructions provided by fellow MVP Paul Edstein in Catalogue Mailmerge.zip which you can download from http://www.gmayor.com/downloads.htm

Much simpler would be to use http://www.gmayor.com/ManyToOne.htm, and the example file features such a table.

Doug has a similar type of application in his merge tools add-in which you can download from https://onedrive.live.com/?cid=5AEDCB43615E886B&id=5AEDCB43615E886B!566

 
Graham Mayor (Microsoft Word MVP 2002-2019)
For more Word tips and downloads visit my web site
https://www.gmayor.com/Word_pages.htm

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 1,356 Applies to: