Applying BuiltinStyle

Hi,

when I'm applying the TOC BuiltinStyles to paragraphs only the indents are applied - without the characterformattings.

I'm using a german MS-Office version where the toc-styles are named "Verzeichnis 1", "Verzeichnis 2" etc. Maybe that's an important information for you ;)

The code below generates a word file like my attached screenshot shows.

-Johannes


IWParagraph paragraph = document.LastParagraph;
paragraph.AppendText("toc1"); paragraph.ApplyStyle(BuiltinStyle.Toc1);

paragraph = document.LastSection.AddParagraph();
paragraph.AppendText("toc2");
paragraph.ApplyStyle(BuiltinStyle.Toc2);

paragraph = document.LastSection.AddParagraph();
paragraph.AppendText("toc3");paragraph.ApplyStyle(BuiltinStyle.Toc3);

paragraph = document.LastSection.AddParagraph();
paragraph.AppendText("toc4"); paragraph.ApplyStyle(BuiltinStyle.Toc4);



applying_toc-style_63c83cd9.zip

2 Replies

JG Johannes Goetz April 29, 2009 08:22 AM UTC

Hi, sorry, forget this thread ;)

I worked with a preformatted template. I did not realised that issue.

-Johannes



BP Bhuvaneswari P Syncfusion Team April 29, 2009 08:24 AM UTC

Hi Johnes,

Thank you for your inquiry.

I have seen your screenshot and created the sample based on the code snippet. Its working fine as expected. The screenshot output is expected output. The TOC style contains only line Spacing and indentation. Could you please do the same thing in MS word ( open new document in MS word, and type text like give in the screenshot and apply the TOC styles)?

Here is the TOC styles defined format.
http://www.syncfusion.com/uploads/redirect.aspx?file=style_d64a535a.png&team=support

Please try the something with MS word, if you find any difference; please let us know with document. This will help us to investigate the issue further.

Best Regards,
Bhuvana


Loader.
Up arrow icon