I'm trying to use the mailmerge package with the KOMA scrlttr2 letter class, but it is failing with a There's no line here to end. message, presumably because the address field is rendering as blank. I expect I am making some elementary mistake. Sample code follows:
\documentclass[foldmarks=false,backaddress=false,
fromalign=false,version=last]{scrlttr2}
\usepackage{fouriernc}
\usepackage[T1]{fontenc}
\usepackage{mailmerge}
\begin{document}
\setkomavar{fromname}{H. G. Wells}
\setkomavar{fromaddress}{Spade House\\ 5281 Radnor Cliff Crescent (West Side)\\ Sandgate, Kent}
\mailfields{address}
\def\today{1st January, 1895}
\begin{letter}{
% George Bernard Shaw,\\
% Shaw's Corner,\\
% Bibbs Hall Lane,\\
% Ayot St. Lawrence, Hertfordshire\\
\mailrepeat{\field{address}}
}
\opening{Dear Shaw,}
You suck!
\closing{Sincerely}
\end{letter}
\mailentry{GBS}
\end{document}
mailmergepackage? If not, you may want to try thedatatoolpackage instead. Please see this sample code (http://tex.stackexchange.com/questions/203918/latex-document-containing-csv-data-with-empty-fields/204111#204111) from Nicola Talbot. It works like a charm withscrlttr2. – blue_tiger300 Jun 12 '15 at 05:39datatool, dunno. Not so much. – Faheem Mitha Jun 12 '15 at 05:44textmergis nice and simple. Please see http://tex.stackexchange.com/a/89803/11604 – Fran Jun 12 '15 at 06:30mailmergeandtextmerg? – Faheem Mitha Jun 12 '15 at 06:40textmergbut nevermailmerge, I have not comparative thoughts about these packages. – Fran Jun 12 '15 at 22:01