Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Aug 20, 2015 10:31 am

When the UpdateTableOfContents method is called within a word document, which contains a table of conents allready, some page numbers of the items in the TOC are changed to be incorrect. If I click an item with Ctrl pressed, the document navigates to the right place of a certain page, which has a different page number from that of the item. What's more, when the operation is done to some items in the TOC, it navigates directly to the Evaluation Warning string.

I want to know that whether the Evaluation version of Spire causes these issuses or not, or the reason.

lfybt
 
Posts: 5
Joined: Thu Aug 20, 2015 2:07 am

Fri Aug 21, 2015 2:38 am

Hello,

Thanks for your inquiry.
Could you please offer us your sample word document and share your sample code with us?
It would be helpful to replicate the issue and work out the solution for you ASAP.
If the information is confidential, you can send it to us ( Support@e-iceblue.com ) via email.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Aug 25, 2015 8:50 am

Hello,

Has your issue been resolved?
If not, could you please offer us your sample word document and share your sample code with us?
It would be helpful to replicate the issue and work out the solution for you ASAP.
If the information is confidential, you can send it to us ( Support@e-iceblue.com ) via email.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Aug 25, 2015 10:21 am

sweety1 wrote:Hello,

Has your issue been resolved?
If not, could you please offer us your sample word document and share your sample code with us?
It would be helpful to replicate the issue and work out the solution for you ASAP.
If the information is confidential, you can send it to us ( Support@e-iceblue.com ) via email.

Best Regards,
Sweety

E-iceblue support team

The attached contains tow doc files. Test.doc is the origin file with a TOC and saved.doc is the file saved after updating TOC. Page numbers of some items in the TOC in saved.doc are different from those in test.doc.
Here is my code.
Code: Select all
Document document = new Document(@"e:\test.doc");
document.UpdateTableOfContents();
document.SaveToFile(@"e:\saved.doc", FileFormat.Doc);
System.Diagnostics.Process.Start(@"e:\saved.doc");

lfybt
 
Posts: 5
Joined: Thu Aug 20, 2015 2:07 am

Wed Aug 26, 2015 3:10 am

Hello,

Thanks for your information.
I have noticed your issue. And I have posted the issue to our dev team. We will inform you when it is fixed. Sorry for the inconvenience.
In addition, you mentioned the issue about the Evaluation Warning string. You could contact our sales team(sales@e-iceblue.com) to get a temporary license file to remove the warning message and have a better evalution on our products.

Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Aug 27, 2015 1:16 am

sweety1 wrote:Hello,

Thanks for your information.
I have noticed your issue. And I have posted the issue to our dev team. We will inform you when it is fixed. Sorry for the inconvenience.
In addition, you mentioned the issue about the Evaluation Warning string. You could contact our sales team(sales@e-iceblue.com) to get a temporary license file to remove the warning message and have a better evalution on our products.

Best Regards,
Sweety
E-iceblue support team

Thank you. Looking forward to your news.

lfybt
 
Posts: 5
Joined: Thu Aug 20, 2015 2:07 am

Wed Feb 24, 2021 11:52 am

Hello,

I tried to update an already existing table of content, but this will not work. Can Spire only update TOC's which are created new by Spire itself?

Could you help me to update an already existing TOC?

Code: Select all
            Dim doc2 As New Document("C:\Projekte\OpenXML\OpenXML\spire.docx")
            Dim docToc As Spire.Doc.Fields.TableOfContent

            doc2.UpdateTableOfContents()
            doc2.SaveToFile("C:\Projekte\OpenXML\OpenXML\spireUpdated.docx", FileFormat.Docx2013)


TOCnotUpdated.jpg

Alexander.Hofmann@dacore
 
Posts: 1
Joined: Mon Nov 16, 2015 3:06 pm

Thu Feb 25, 2021 1:39 am

Hello Alexander,

Thanks for your inquiry.
I did an initial test with your file and indeed found that the TOC was not updated correctly. I have logged this issue in our bug tracking system with the ticket SPIREDOC-5555. If there is any update, we will let you know.
Sorry for the inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Mon May 23, 2022 7:54 am

Hi, we also have an issue with the update of TOC. has this been fixed?

In our case, the page numbers don't update to the correct page in the document.

Thanks,
Rafael.

inheritaustralia
 
Posts: 5
Joined: Wed Nov 24, 2021 6:25 am

Mon May 23, 2022 9:40 am

inheritaustralia wrote:Hi, we also have an issue with the update of TOC. has this been fixed?

In our case, the page numbers don't update to the correct page in the document.

Thanks,
Rafael.


Hello Rafael,

To help us reproduce your issue, could you please provide your test code and the docx used (if any)? Thanks in advance.
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Return to Spire.Doc