Используя данный код выдает ошибку
$PHPWord = new PHPWord();
$doc = $PHPWord->loadTemplate($template);
$section = $PHPWord->createSection();
$section->addText('bla bla bla');
$doc->setValue('object', $section);
$doc->save($tempFile);
выдает ошибку:
[ErrorException] E_RECOVERABLE_ERROR
Object of class PHPWord_Section could not be converted to string (0)
/www/local/libs/classes/PHPWord/Template.php:105
#0: str_replace(string, string, string)
/www/local/libs/classes/PHPWord/Template.php:105
#1: PHPWord_Template->setValue(string, object)
/www/local/page/kp/index.php:189