[quote user="Shaharin"]
I would like the results of a mailmerge appear on multiple lines e.g.
The address we have on file for you is:
Name
Address
City State Postcode Country
The catch is that all of the above, necessarily, will have to be in one single field in a record because I have a spreadsheet that generates an alternative text, in the same field, if NO address is present.
However, when the spreadsheet is exported to a text/csv/tsv file, by definition it takes up multiple lines, and screws up the condition that requires the record to be on one line.
My question is "Is it possible to embed a carriage return and/or line-feed character into the field to generate the above output, and if so, what format should that character take?" In Excel it's simply "char(10)" as one parameter in the concatenate() function.
Alternatively, is there some sort of an IF-THEN-ELSE statement that can be incorporated into the mailmerge message that could choose between one set of fields or another?
[/quote]
OK, several things here - where to start?
Firstly, are you saying that your spreadsheet exports to a field that essentially consists of "NameAddress-or-alternative-textCityStatePostcodeCountry"? And that therefore you want to be able to have new line characters in that field?
Secondly, I don't understand (though I haven't tried to replicate what you're doing) how your CSV file has multiple lines per record. At the risk of treating you like an idiot - and I apologise in advance for this question but I think it needs to be explicitly stated - are you sure you haven't simply got "word wrap" enabled when you view the CSV?
The details of the abilities and limitations of mail merges are not within my current knowledge. I've rarely used it. I don't think you can do any sort of IF-THEN-ELSE nor do I know whether, if you are able to somehow include a CR/LF in the data, it would be displayed correctly. Perhaps someone else will post an answer to those points.
[quote user="Shaharin"]<P>I would like the results of a mailmerge appear on multiple lines e.g. </P><BLOCKQUOTE><P>The address we have on file for you is:
</P><P>Name</P><P>Address</P><P>City State Postcode Country</P></BLOCKQUOTE><P>The catch is that <B>all of the above</B>, necessarily, will have to be <B>in one single field</B> in a record because I have a spreadsheet that generates an alternative text, in the same field, if NO address is present. </P><P>However, when the spreadsheet is exported to a text/csv/tsv file, by definition it takes up multiple lines, and screws up the condition that requires the record to be on one line. </P><P>My question is "<I>Is it possible to embed a carriage return and/or line-feed character into the field to generate the above output, and if so, what format should that character take?</I>" In Excel it's simply "char(10)" as one parameter in the concatenate() function.</P><P style=""> Alternatively, is there some sort of an IF-THEN-ELSE statement that can be incorporated into the mailmerge message that could choose between one set of fields or another?
</P><P>[/quote]</P><P>OK, several things here - where to start?</P><P>Firstly, are you saying that your spreadsheet exports to a field that essentially consists of "NameAddress-or-alternative-textCityStatePostcodeCountry"? And that therefore you want to be able to have new line characters in that field?</P><P>Secondly, I don't understand (though I haven't tried to replicate what you're doing) how your CSV file has multiple lines per record. At the risk of treating you like an idiot - and I apologise in advance for this question but I think it needs to be explicitly stated - are you sure you haven't simply got "word wrap" enabled when you view the CSV?</P><P>The details of the abilities and limitations of mail merges are not within my current knowledge. I've rarely used it. I don't think you can do any sort of IF-THEN-ELSE nor do I know whether, if you are able to somehow include a CR/LF in the data, it would be displayed correctly. Perhaps someone else will post an answer to those points.</P>