- Code: Select all
\* Mergefield
This is a (decrufted) version of the code I am using:
- Code: Select all
import org.docx4j.model.fields.merge.MailMerger;
InputStream body; // assigned elsewhere
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(body);
//mail merge
WordprocessingMLPackage merged = MailMerger.getConsolidatedResultCrude(wordMLPackage, translations_wrapped);
Any suggestions?
I also have a bonus question: is it possible to merge text into a field which contains linebreaks, so that the text shows up on multiple lines after merging?