Indeed, PHPDOCX 2.3 can insert DOCX document inside another:
[code]$docx->addDOCX('../files/Text.docx');[/code]
However, it is not possible to add a DOCX template inside the DOCX document that we are developping :'(
I tried :
[code]
$docx = new CreateDocx();
$docx->setEncodeUTF8();
$docx->addText(’First content’);
$docx->addDOCX('template_test.docx');
$docx->addTemplateVariable('VAR1', 'value1');
$docx->addTemplateVariable('VAR2', 'value2');
$docx->addTemplateVariable('VAR3', 'Value3);
$docx->addText(’Second content’);[/code]
but the template variables are not replaced.
I also tried:
[code]
$docx = new CreateDocx();
$docx->setEncodeUTF8();
$docx->addText(’First content’);
$docx->addTemplate('template_test.docx');
$docx->addTemplateVariable('VAR1', 'value1');
$docx->addTemplateVariable('VAR2', 'value2');
$docx->addTemplateVariable('VAR3', 'Value3);
$docx->addText(’Second content’);[/code]
The template variables are well replaced but only the DOCX template is present in the current DOCX document we are developping...
Any help would be appreciated