Table of contents in word document

Hi,

We will try to support TOC as soon as possible and release a hotfix in a few days.

wow,

You guys are fast
I like the facilities this word component provides now. As soon as I can do a TOC and basic Header Styles to build it, it’s a sale.

best regards,

ioan

Hi ioan,

We are now working to support TOC in the documents. This requires implementing support for bookmarks and nested fields which are often requested features by themselves.

The best we can do is to let Aspose.Word pass TOC unmodified into the output document as discussed in the previous topics.

Please note that if you mail merged or otherwise manipulated content of the document, Aspose.Word will not update the TOC. It is up to MS Word to update the TOC field. When the fields in the document are updated depends on the user settings, they can be updated on open, on print or manually. This means that the user might see not up to date TOC at times depending on the settings and might need to refresh the field. Is this okay with you?

Thank you very much for your effort. I’m looking forward to testing this feature. I believe a TOC is based upon Headings.

Best regards,

ioan Klaassen

Hi ioan,

We have just released a version that supports bookmarks. This is about half way through to support TOC fields because TOC fields use bookmarks and nested fields. We are now going to implement support for nested fields.

Hi ioan,

Aspose.Word 1.5 is out and it supports TOC fields.

Hi Roman,

I have succesfully imported a word document with a TOC now.
Next thing to do for me is finding a way on how to add my TOC fields to the document. The purpose of this is to make a nice reports.

best regards,

ioan

If only my client wanted pdf

This is interesting. All I need to do is allow adding bookmarks and fields to the document using DocumentBuilder. This is something we wanted to do anyway so maybe we can bring this work forward. I will keep you posted.

Hi ioan,

Aspose.Word 1.5.2 is available with new DocumentBuilder.InsertTableOfContents method. Check out if this solves your problems.

Hi Roman,

Thanks for your effort ! I tested the insertableofcontents method. and it works fine. But for my situation it’s not much use. I load a word document with an existing TOC, and add many chapters of text. Each chapter has many paragraph styles, of which the headings are collected by the TOC. I can do this now in an awkward matter with many predifined fields. But it would be so much nicer if I were able to add a text with stylenames … from code
But I haven’t found a way to use existing styles from code.

Best Regards,

ioan Klaassen

Hi ioan,

No worries, we were going to allow specifying styles using DocumentBuilder too. It will be something like DocumentBuilder.ParagraphFormat.Style = “MyStyle”.

Do you need to be able to create styles programmatically? This can also be done, but we probably want to do this later.

Hi Roman,

This is great I will only use the styles from the template documents. And of those the most important ones are “normal” and “heading1”, “heading2”. The headings are then collected by Word to make a nice TOC.

Best regards,

ioan klaassen

DocumentBuilder.ParagraphFormat.StyleName property is available in Aspose.Word 1.5.4.

Here is a code example:

builder.InsertParagraph();
builder.ParagraphFormat.StyleName = "Heading 1";
builder.Writeln("Heading 1");

Hi Roman,

I tested the new styles property. and it works like a charm Now I can fully comply with my clients wishes. And do it faster and easier than any other method for making Word files.
If my project proposal is agreed upon, we will choose your components.

best regards,

ioan

Hi,

I want to create the TOC programatically in word document using ASP.NET. Can someone has any info on this. Is any of the ASPOSE component support this.

Sure, it can be done using Aspose.Words. Please check the following documentation article:
https://docs.aspose.com/words/net/working-with-table-of-contents/

I got to generate pocket booklet with (Table of Content)TOC . booklet layout will be 8 pages per A4 size paper.
Aspose Reporting Serivces support this feature ? If so, we are willingly to buy the product .

Hi,

If you need to generate the document from an RDL report, then this product is right what you need. To insert a TOC, specify “TOC” as the textbox ToolTip property value. Note this feature is undocumented.

Thanks.

Thanks you very much for reply .

I want to generate Word Document from RDL .
I tested text box Tooltip as TOC .
I might miss out steps to follow.
Knowing that this feature is undocumented, could you please give me instruction steps to follow?

  1. Style need to be “header1” ?If so, how to ?
  2. need bookmark ?

currently if , I apply Tooltip as TOC . textbox.value can’t even visible at word doc.