Hi,
at DOCX I have this : {MERGEFIELD name \*MERGEFORMAT}
I use this code to replace the field and everything works fine :
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new java.io.File(FILE_PATH_IN));
List<Map<DataFieldName, String>> data = new ArrayList<Map<DataFieldName, String>>();
Map<DataFieldName, String> item = new HashMap<DataFieldName, String>();
item.put(new DataFieldName("name"), "Peter");
data.add(item);
org.docx4j.model.fields.merge.MailMerger.setMERGEFIELDInOutput(OutputField.KEEP_MERGEFIELD);
org.docx4j.model.fields.merge.MailMerger.performMerge(wordMLPackage, item, true);
wordMLPackage.save(new java.io.File(FILE_PATH_OUT));
PROBLEM
At my DOCX I have : {INCLUDEPICTURE "{MERGEFIELD picturelocation}" \d}
I use the same code to replace picturelocation but doesn´t work! I want this :
item.put(new DataFieldName("picturelocation"), "C:\Images\image.png");
Can anyone help me to solve this problem?
Thanks!