Sign UpSign Up   Sign InSign In Welcome Guest,
Live Chat Live Chat

Table of contents in word document

Last post 07-06-2009, 11:08 PM by myokhin. 26 replies.
Page 1 of 2 (27 items)   1 2 Next >
Sort Posts: Previous Next
  •  05-14-2004, 5:37 AM 6731

    Table of contents in word document

    hi all,

    I have a word document that i use as template. the resulting Word document must have a table of contents, and so I have it in the template as: { TOC \o "1-2" \h \z }

    When Aspose.Word loads this template from disc, it stops with : cannot interpret nested fields and crashes on -> Document mainDoc = word.Open("WordTest.doc");

    Maybe it's better if the component would just ignore the TOC codes, and pass these blocks unmodified on to the final resulting document?
    This way, I don't have to explain to my customers why they can't have a TOC in their documents.

    thanks !
    ioan

     
  •  05-14-2004, 12:35 PM 6738 in reply to 6731

    Re: 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.

    Roman Korchagin
    Aspose.Words Team Leader
    Aspose Auckland Team
     
  •  05-18-2004, 12:17 AM 6858 in reply to 6738

    Re: Table of contents in word document

    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
     
  •  05-23-2004, 2:32 PM 7033 in reply to 6858

    Re: Table of contents in word document

    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?

    Roman Korchagin
    Aspose.Words Team Leader
    Aspose Auckland Team
     
  •  05-24-2004, 12:07 AM 7049 in reply to 7033

    Re: Table of contents in word document

    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
     
  •  05-30-2004, 4:47 PM 7227 in reply to 7049

    Re: Table of contents in word document

    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.


    Roman Korchagin
    Aspose.Words Team Leader
    Aspose Auckland Team
     
  •  06-08-2004, 5:03 AM 7377 in reply to 7227

    Re: Table of contents in word document

    Hi ioan,

    Aspose.Word 1.5 is out and it supports TOC fields.
    Roman Korchagin
    Aspose.Words Team Leader
    Aspose Auckland Team
     
  •  06-09-2004, 2:27 AM 7423 in reply to 7377

    Re: Table of contents in word document

    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 :)

     
  •  06-09-2004, 2:32 AM 7424 in reply to 7423

    Re: Table of contents in word document

    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.

    Roman Korchagin
    Aspose.Words Team Leader
    Aspose Auckland Team
     
  •  06-15-2004, 3:59 AM 7590 in reply to 7424

    Re: Table of contents in word document

    Hi ioan,

    Aspose.Word 1.5.2 is available with new DocumentBuilder.InsertTableOfContents method. Check out if this solves your problems.
    Roman Korchagin
    Aspose.Words Team Leader
    Aspose Auckland Team
     
  •  06-15-2004, 5:59 AM 7595 in reply to 7590

    Re: Table of contents in word document

    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
     
  •  06-15-2004, 9:48 PM 7638 in reply to 7595

    Re: Table of contents in word document

    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.

    Roman Korchagin
    Aspose.Words Team Leader
    Aspose Auckland Team
     
  •  06-15-2004, 11:56 PM 7644 in reply to 7638

    Re: Table of contents in word document

    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
     
  •  06-19-2004, 6:49 PM 7746 in reply to 7644

    Re: Table of contents in word document

    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");

    Roman Korchagin
    Aspose.Words Team Leader
    Aspose Auckland Team
     
  •  06-22-2004, 1:36 AM 7810 in reply to 7746

    Re: Table of contents in word document

    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
     
Page 1 of 2 (27 items)   1 2 Next >
View as RSS news feed in XML