We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how i get the table of contents

Thread ID:

Created:

Updated:

Platform:

Replies:

97088 Oct 27,2010 10:19 AM UTC Nov 4,2010 09:32 AM UTC ASP.NET Web Forms (Classic) 4
loading
Tags: DocIO
asdf
Asked On October 27, 2010 10:19 AM UTC

hi,

how i get the table of content from a existing worddocument. I know how i can add one, but get. I want to update the page numbers.

I use syncfusion version 8.1.0.30.

thanks and regards
ladida


asdf
Replied On October 28, 2010 11:49 AM UTC

ok, i must add a new table of content. But, how i can update it without press F9 or right click ... ?
Is there a methode they can do this?

regards,
ladida


Poornima R [Syncfusion]
Replied On October 29, 2010 12:12 PM UTC

Hi ladida,

Thanks for your interest in Syncfusion products.

The Toc fields can't be updated by DocIO, it should be updated only after opened in MS word and by pressing F9 or select the fields and by giving update field. Since these fields values can't be set during document creation. The fields are only updated after opened by MS word.

We can only insert the TOC or other fields using DocIO.

As a
workaround
please use create one macro like give below in any of your word document. This will automatically updates when ever any documents opened. The AutoOpen macro automatically runs when the document opens.

Sub AutoOpen()
Dim aStory As Range
Dim aField As Field
For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory
End Sub


Here is the link more about automatically updates fields

http://support.microsoft.com/kb/212703/


Please let me know if you have any questions.

Regards,
Poornima


asdf
Replied On November 3, 2010 01:25 PM UTC

hi Poornima R,

thanks for your answer.

but I dont find a way to add a macro with docio.


And for future syncfusion versions: It would be very nice if your team add a method to update the table of content. Because I want to export it as .pdf, so no one can remove the watermark.

regards,
ladida


Poornima R [Syncfusion]
Replied On November 4, 2010 09:32 AM UTC

Hi ladida,

Thank you for your update.

Currently Essential DocIO do not have the support for adding macro in a word document. We have already logged this as a feature request. Regarding "And for future syncfusion versions: It would be very nice if your team add a method to update the table of content", we have already logged this as a feature. We will consider this feature in any one of our future releases.

Please let us know if you have any questions.

Regards,
Poornima


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;