Hi every body,
The issue from the template is empty !
What's wrong with may code ?
My code :
Many thks for your advises !
The issue from the template is empty !
What's wrong with may code ?
My code :
<?php
// Include the PHPWord.php, all other classes were loaded by an autoloader
require_once 'PHPWord.php';
require_once 'PHPWord/Template.php';
$PHPWord = new PHPWord();
$template = $PHPWord->loadTemplate('Examples/Template.docx');
$template->setValue('Value1', '101');
$template->setValue('Value2', '102');
$template->setValue('Value3', '103');
$template->setValue('Value4', '104');
$template->setValue('Value5', '105');
$template->setValue('Value6', '106');
$template->setValue('Value7', '107');
$template->setValue('Value8', '1008');
$template->setValue('Value9', '1000');
$template->setValue('Value10', '10067');
$objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');
$objWriter->save('../ComperioV1/dossierPerso/Template.docx');
?>
Why that ?Many thks for your advises !