Don't forget to update fields of the document by pressing F9 to see the TOC

Hi

Is there really no way to automate the field update other than opening the document and pressing F9?

What happens if the document is saved as a PDF? does the TOC appear then?

Lui

We use a Word macro to update the fields after Aspose has assembled the document. Not ideal but it works.

That would be client side? or is it server side?

Lui

The macro should be included in your template and will execute when the generated document will be opened in MS Word on client’s side.

And yes, the actual page numbers will appear in the resulting PDF after the document is converted. You don’t need any macros for that. Aspose.PDF renders the document and therefore knows page layout and can assign page numbers. As soon as Aspose.Words rendering engine will be released we will be able to do it on Aspose.Words side too.