# Mail Merge and double carriage return



## Andrew Fergus (Jun 29, 2009)

Hi

I'm helping someone automate a process and we are performing a mail merge in Word based on an Excel document.  There is a text field into which the user enters a description.  Often multiple carriage returns are entered in the particular cell in the Excel document using Alt+Enter.  This provides some basic formatting to space out the text a little.

What I am seeing in the mail merged document is that a single carriage return (entered using Alt+Enter in Excel) comes through into the mail merge document ok.  However, a double carriage return (ie 2 consecutive carriage returns) only ever comes through as one carriage return in the Word document.

Does anyone have any thoughts on why this would be doing this?  Or how we can stop the Word document from ignoring the double carriage returns?

Thanks
Andrew


----------



## Andrew Fergus (Jun 30, 2009)

*SOLVED: Mail Merge and double carriage return*

Ah - the penny drops.......

Using Alt+Enter creates a line feed character, aka char(10). To get multiple carriage returns I need to pass multiples of char(14) and char(10).

Andrew


----------



## Macropod (Jun 30, 2009)

Hi Andrew,

I think that's char(13) and char(10). However, a simpler way might be to insert a space between the char(10) pairs.

BTW, the fact you're using line-feeds suggests the data really should be in separate columns.


----------



## Soco13 (Jun 3, 2013)

*Re: SOLVED: Mail Merge and double carriage return*



Andrew Fergus said:


> Ah - the penny drops.......
> 
> Using Alt+Enter creates a line feed character, aka char(10). To get multiple carriage returns I need to pass multiples of char(14) and char(10).
> 
> Andrew



I know this is an old thread, but I have the same problem.  I need a double line break in my final mail merge document.  However, I don't understand Andrew's solution.  

How does one manually enter char(10) or char(13) into the Excel cell?  I tried typing it into the cell, but then those exact characters ("char(10)") are what showed up in my mail merge final document.

My workaround is to replace the line breaks with an asterisk (*), then after the mail merge is done, do a find/replace within Word to delete all asterisks (find asterisk, replace with nothing), which leaves the blank line.  It's a bit tedious, but it works.  Can anyone explain an easier way?


----------



## Macropod (Jun 3, 2013)

*Re: SOLVED: Mail Merge and double carriage return*

As Andrew already indicated, Alt-Enter create the Char(10) within the cell.


----------



## Soco13 (Jun 3, 2013)

*Re: SOLVED: Mail Merge and double carriage return*



Macropod said:


> As Andrew already indicated, Alt-Enter create the Char(10) within the cell.



Although Alt-enter will put the line break Char(10) within the cell, those line breaks will not translate over to MS Word in a mail merge.  Everything in the mail merge just shows up single spaced.

Andrew and I have the same problem.


----------



## Macropod (Jun 3, 2013)

*Re: SOLVED: Mail Merge and double carriage return*

Any character (other than another Alt-Enter) between the Alt-Enter characters (e.g. a space or a tab) will prevent them being treated as one.


----------

