Forum


Replies: 2   Views: 3405
Removechapter
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 telekomsimple  · 10-01-2013 - 14:22

Hi there,

I am using the removeChapter function. The chapter was deleted but the table of contents was not refreshed (The chapter is still there). Is there any chance to refresh the table of content? The document is based on a template.

The second thing is:

What is the best way to remove more than one chapter?

at the moment i would do something like this:
$newDocx->removeChapter('source.docx', 'target.docx', 'Chapter3');
$newDocx->removeChapter('target.docx', 'target1.docx', 'Chapter4');
$newDocx->removeChapter('target1.docx', 'target2.docx', 'ChapterX');

Is it possible to remove more than one chapter with one call of removeChapter?

Thank in advance

Cheers

Posted by admin  · 11-04-2013 - 12:13

Hello,

If you want to refresh the table of contents you must add a macro that do this when the document is oponened.
Sorry but with the current version of phpdocx It's not possible to remove more than one chapter in the same removeChapter.

Regards.