Re: MS-Word Table of Contents Workaround

Hussein Shafie <[email protected]> Tue, 18 Aug 2015 18:58:28 +0200
Newsgroups gmane.text.xml.xfc.general
Message-ID <[email protected]>
Sean S.  wrote:
> Are you aware of any workarounds for having to manually refresh the
> table of contents when exporting to Word?

We have tried to find such workaround and the answer seems to be:

The only possible workaround is to add to the generated DOCX file a very 
simple VBA macro which automatically updates all fields when the 
document is being opened. Something like:

---
Sub AutoOpen()
     With Options
         .UpdateFieldsAtPrint = True
         .UpdateLinksAtPrint = True
     End With
     ActiveDocument.Fields.Update
End Sub
---

However this would force us to generate a DOCM file (=DOCX with macros)
and for now we don't want to get into that (because this would force the 
user of the DOCM file to adjust her/his security settings).



Related FAQ:
---
I use the page-number-citation object to print the number of pages in my 
document, but the displayed value is always 0 when I load the document 
in MS-Word. How can I get the correct value?
---
http://www.xmlmind.com/foconverter/faq.html#fields

--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support