Table of content in c# [modified]
-
hello forum, well here i m in problem of generating table of content(which is msword feature to generate indexes). What i have done till know is i generated 2 styles in c# code and apply to word document generated. Now whats my problem is i have to add these styles to my table of contents ADD method, which requires parameter "ADDEDSTYLE' if new style is to be applied. i m attaching the code for addingStyle Word.TableOfContents sty; object StyleMain = "Main"; object StyleSubMain = "SubMain"; short lev1 = 1; short lev2 = 2; sty.HeadingStyles.Add(ref StyleMain, lev1); sty.HeadingStyles.Add(ref StyleSubMain, lev2); object stylee = sty; myWordDoc.TablesOfContents.Add(myWordApp.Selection.Range, ref missing, ref missing, ref missing, ref missing, ref missing, ref RightAlignPageNumbers, ref missing, ref stylee, ref UseHyperlinks, ref missing, ref UseOutlineLevels); -- modified at 5:41 Friday 20th April, 2007
Hello Forum Always be in touch to help about the topic ASP.NET