How to merge several files into one docx?

Jul 16, 2013 at 9:01 PM
how to merge several files into one docx?
I have tried:
$PHPWord = new PHPWord();
$section = $PHPWord->createSection();
$document = $PHPWord->loadTemplate('dir1/file1.docx');
$section->addPageBreak();
$document = $PHPWord->loadTemplate('dir1/file2.docx');
$document->save('dir2/test.docx');
but saves only the last