A modified List.php example is shown below. I initially had problems with this solution because I only used the relative template path and not the relative path to the actual template [u]document file[/u] in the constructor.
My full solution also involved creating a docx and Temp directory under the examples directory:
v2.5.1/examples/docx
v2.5.1/examples/Temp
The new Word document is created in the docx directory. Note that I later moved the Temp directory to a better location for our server. Also note that your custom code files will likely have different relative paths than the example projects.
[code]
<?php
/**
* Insert an unordered list into a Word document.
*
* @category Phpdocx
* @package examples
* @subpackage easy
* @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
* (http://www.2mdc.com)
* @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
* @version 1.8
* @link http://www.phpdocx.com
* @since File available since Release 1.8
*/
require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx("../../templates/phpdocxBaseTemplate.docx", "../Temp");
$valuesList = array(
'Line 1',
'Line 2',
'Line 3',
'Line 4',
'Line 5'
);
$paramsList = array(
'val' => 1
);
$docx->addList($valuesList, $paramsList);
$docx->createDocx('../docx/example_list');
[/code]