Forum


Replies: 3   Views: 5247
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 benoit  · 03-06-2015 - 08:24

Hi I need a fonction to duplicate blocks (for duplicate tables in example) in a template (with duplicate and incremante variables in each block). It's possible ? This function exists in phpword... Thanks Ben

Posted by admin  · 03-06-2015 - 10:53

Hello, It's very easy. You just need to create a WordFragment with the block content and add it as many times as needed; you can do this with documents created from scratch and with templates. Regards.

Posted by benoit  · 03-06-2015 - 11:15

Ok thanks for you response. But I talk about block in template beetwen $BLOCK_lot$ I have a word template like with blablablabl blablabla $BLOCK_lot$ ans i want dynamicly make a doc like with blablablabl blablabla $BLOCK_lot1$ $BLOCK_lot2$ $BLOCK_lot3$ ...

Posted by admin  · 03-06-2015 - 11:22

Hello, There's no specific method to do that. But it's easy to do with WordFragment objects and a custom var which controls the block number. Regards.