Hi,
I am also trying to replace picture with text from the template to the generated docx file. i am able to replace the text in the header but for the image say textbox with a text its not happening.
WordprocessingMLPackage template=WordprocessingMLPackage.load(new File("c:\\Sample.docx"));
RelationshipsPart rp = template.getMainDocumentPart().getRelationshipsPart();
Relationship relationship = rp.getRelationshipByType(Namespaces.HEADER);
org.docx4j.openpackaging.parts.Part p = rp.getPart(relationship);
Hdr header1 =((HeaderPart)p).getJaxbElement();
List<Object> paragraphs = (List<Object>) header1.getEGBlockLevelElts();
for(Object paragraph:paragraphs)
{
List<Object> paracontent=((P)paragraph).getParagraphContent();
for(Object run:paracontent)
{
List<Object> runcontent =((R)run).getRunContent();
for(Object ...