Hi
Thanks for your request. I think that you can use MergeField event to achieve this. For example here is C# code that achieves this.
public void TestMailMerge_100716()
{
Document doc = new Document(@"318_100716_pveeranki\in.doc");
string[] arr = { "test", "test", "test" };
string[] names = { "Field1" };
object[] values = { arr };
doc.MailMerge.MergeField += new MergeFieldEventHandler(MailMerge_MergeField_100716);
doc.MailMerge.Execute(names, values);
doc.Save(@"318_100716_pveeranki\out.doc");
}
void MailMerge_MergeField_100716(object sender, MergeFieldEventArgs e)
{
if (e.FieldName == "Field1")
{
string text = string.Empty;
string[] arr = (string[])e.FieldValue;
for (int i = 0; i < arr.Length; i++)
{
text += arr[i] + "\n";
}
e.Text = text;
}
}
You can find information about using MergeField event in JAVA here
I hope that this will help you.
Best regards.