We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Generating TOF (Table Of Figures) in a Word Document


Using ASPOSE. Words how do we generate TOF (Table Of Figures) in a Word Document. Is there any API available?

Please advice.




<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry.

You can insert fields in Word document using Documentbuilder.InsertField method. Please see the following link for more information:


For example to insert TOF you can use the following code:

// Insert Table of Figures

builder.InsertField("TOC \\h \\z \\c \"Picture\"", null);

Or the following code to insert TOC:

// Insert Table of Contents

builder.InsertField("TOC \\o \"1-3\" \\h \\z \\u", null);

Unfortunately, at the moment you should update these fields manually in MS Word to see correct values. However, there is also good news for you, We are going to support evaluation of TOC fields before the next release. Please see the following link for more information:


Best regards.

Thanks a lot for the response. Will try it.