Home > OS >  Mailmerge from Access multi line text box with Entry Key Behaviour set to New Line in Field causes C
Mailmerge from Access multi line text box with Entry Key Behaviour set to New Line in Field causes C

Time:12-28

I have a textbox on my Access form for an address. The Entry key behaviour for this field is set to New Line in Field. Thus, on the Access form the lines of the address are close together. When I use this field for a mailmerge document the result is the address formatted as if return has been pressed rather than new line resulting in a very spaced out address. When I look at the characters in the address field I see that the division between the address lines is CRLF - hence the big spacing on mailmerge. I have fudged it to produce what I want by holding a second edited version of the address but this goes against the grain and I feel there must be a more sophisticated way of handling this.

CodePudding user response:

In the mailmerge main document, simply change the paragraph before/after spacing for the paragraph containing your address field to 0.

CodePudding user response:

Thank you for the suggestions. I changed my sql select such that it now reads:

SELECT *,Replace([outaddress], Chr(13) & Chr(10), Chr(11)) as mAddress FROM ...

which gives me a field to use in mailmerge and thus solves the problem. I tried replacing with Chr(10) but that didn't work so used Chr(11) which works fine. Not sure why as Chr(10) - LF makes much more sense than Chr(11) - HT.

  • Related