Forum


Replies: 3   Views: 1212
How to duplicate blocks
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 richard.keller  · 13-04-2017 - 02:11

Edited by admin · 13-04-2017 - 09:42

I'm currently trialing phpdocx, and I'm trying to duplicate a block multiple times. As far as I understand, I need to use WordFragment objects to do this. But how do I create a WordFragment based on an existing variable / block in a document?

In other words, I have a template with a block of content in it (eg. containing some text, some tables, and some variables). How can I create a WordFragment out of this block so that I can manipulate the variables inside it, and then paste the WordFragment back into the original template?