This project is read-only.

problem with template

Oct 26, 2010 at 8:02 AM
Edited Oct 26, 2010 at 9:05 AM

I have a problem using the template function.

The code of my PHP script is:

 

require_once 'Classes/PHPWord.php';

$PHPWord = new PHPWord();

$document = $PHPWord->loadTemplate($Template);

$document->setValue('Value1', $Cliente.' ('.$CodiceFiscale.')');
$document->setValue('Value2', $Classificazione1);
$document->setValue('Value3', $Classificazione2);
$document->setValue('Value4', $Classificazione3);
$document->setValue('Value5', $PianoFabbisogni1);
$document->setValue('Value6', $PianoFabbisogni2);
$document->setValue('Value7', $NotePianoFabbisogni);
$document->setValue('Value8', $ContrattoFornitura1);
$document->setValue('Value9', $ContrattoFornitura2);
$document->setValue('Value10', $NoteContrattoFornitura);
$document->setValue('Value11', $AltraDocumentazione);
$document->setValue('Value12', $Intranet1);
$document->setValue('Value13', $Infranet1);
$document->setValue('Value14', $Internet1);
$document->setValue('Value15', $TipologiaServizi);
$document->setValue('Value16', $CanoneAnnuo);
$document->setValue('Value17', $UnaTantum);
$document->setValue('Value18', $NumeroServizi);
$document->setValue('Value19', $DataContratto);
$document->setValue('Value20', $Difformita1);
$document->setValue('Value21', $Difformita2);
$document->setValue('Value22', $AltreNote);
$document->setValue('Value23', $RisultatoRiesame1);
$document->setValue('Value24', $RisultatoRiesame2);
$document->setValue('Value25', $Funzione1);
$document->setValue('Value26', $Data1);
$document->setValue('Value27', $NomeCognome1);
$document->setValue('Value28', $Funzione2);
$document->setValue('Value29', $Data2);
$document->setValue('Value30', $NomeCognome2);

$document->save($NomeFile);

 

I've modified the word template and now the values are from "Value1" to "Value30".

The output file is saved but, when I open that, only values from 1 to 10 are modified.

Please.....help me