I have recently found this product and have been able to successfully create new Word documents, but it seems I am unable to affect a template. I am not sure if this is a Word version issue, but I am using Word 2010.
Following is the code I am using to replace two values:
$PHPWord = new PHPWord();
$reportname= $latisid.' - '.$devicename.'.docx';
$document = $PHPWord->loadTemplate($template);
echo "<a href='http://10.1.11.246/prov_inv/output/".$reportname."'>Download New Fixed Asset Document";
The text in Word is as follows:
PREPARED AND TAGGED BY: ValueTwo
The template is loaded and the new document saved, though no replacements occur.
Am I missing something? Is there a way to debug the setValue process?
Any guidance would be greatly appreciated!