We help IT Professionals succeed at work.
Get Started

Include carriage return in mail merge?

Last Modified: 2013-11-18
Is it possible to add something into a mail merge which inserts a new line?  

We are trying to force people in our organisation to follow strict guidelines when writing letters.  I have written a little application in Delphi which accepts input such as recipient, address, signature, cc etc and sticks it into a table in a html file.  My template then reads this html file and merges it to create the document. My problem lies here:  there are some fields, for example, sent by fax, which will only be included if a checkbox is selected.  Currently, if this is not included, my word document leaves too big a gap where I've pencilled it in.  I'd like to change the word doc so that the merge pulls in all the 'optional extras' on the same line as what comes after it, and then include a carriage return in the table where it pulls the data in from.  That way, if the item isn't included, nothing will be added and I won't have extra white space.  Is it possible?  I also have areas where I'd like to add tab characters.  

I hope you can help me, this is driving me nuts :)  If my description of the problem isn't clear enough, please let me know what I need to clarify and I will!

Thank you!  
Watch Question
Top Expert 2012
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE