Forum


Replies: 1   Views: 2349
Crossreference heading
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 Brck  · 27-05-2018 - 15:26

Hi, 

Is there any example of how to use addCrossreference with the type "heading"? 

Best regards,

Brc

Posted by admin  · 28-05-2018 - 07:22

Hello,

If you set the addCrossRefence method as type heading an internal bookmark is created (before and after the heading). To do it works the referenceName option must be equals to the heading text content.

The easiest solution is creating a custom bookmark with addBookmark or with MS Word if you are using a template. Using DOCXPath you can insert a custom bookmark anywhere in the document.

We move the request to the dev team to add new cross-reference samples.

Regards.