update table of contents when opening docx

286 views
Skip to first unread message

Bastien Billey

unread,
Apr 23, 2014, 8:22:27 AM4/23/14
to xdocr...@googlegroups.com
Hi,
I have a table of contents in my report, and I want to update it when I open the generated docx for the first time.

How I can do that ?

Thank's

Angelo zerr

unread,
Apr 23, 2014, 8:28:16 AM4/23/14
to xdocr...@googlegroups.com
Hi Bastien,

This issue was already posted at https://code.google.com/p/xdocreport/issues/detail?id=126 and today I have not solution about that.

Regards Angelo


--
You received this message because you are subscribed to the Google Groups "xdocreport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdocreport+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bastien Billey

unread,
Apr 24, 2014, 4:03:42 AM4/24/14
to xdocr...@googlegroups.com
I think there is a way to achieve that. Cause before use xdocreport we used DocX4j to generate our report en it was possible.

In the WordprocessingMLPackage class of DocX4, if you do 

wordprocessingMLPackage.getMainDocumentPart()
.getDocumentSettingsPart().getJaxbElement()
.setUpdateFields(new BooleanDefaultTrue());

when you open your word for the first time, it will ask you if you want to update your content. Maybe it's a possible solution to see what DocX4j do in that method

Angelo zerr

unread,
Apr 24, 2014, 4:07:29 AM4/24/14
to xdocr...@googlegroups.com
Thank's bastien for this info. I must find time to study that (very busy for the moment).

Regards Angelo
Reply all
Reply to author
Forward
0 new messages