Forum


Replies: 1   Views: 637
Clone block to end of 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  · 22-12-2022 - 06:17

Hello,

What version and license of phpdocx are you using? Please send to contact[at]phpdocx.com the username or email of the user that purchased the license you are using.

You need to use DOCXPath (https://www.phpdocx.com/documentation/introduction/docxpath) for both tasks.

I'm working with blocks and need to clone a block and append it to the end of the document, not just where it is currently located

You need to use cloneBlock to clone the block and then moveWordContent to move the cloned block to the end of the document.

is it possible to use the deleteBlock method to delete the Nth clone of a block

The deleteBlock method doesn't include a method to delete specific positions of a block, but you can use removeWordContent to accomplish this task.

Regards.