Replies: 2   Views: 3201
How can i copy section and paste it n-times to document?
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 14-10-2016 - 06:56


The method cloneWordContent ( can clone elements but not whole sections in a step. Using this method you can clone a whole section selecting and cloning each individual element.

The easiest approach is to use the mergeDocx method ( Instead of cloning the section, we recommend you to create a DOCX with the content of the section and merge it as many times as needed.

You can see a similar approach on this cookbook page: