Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Table of content in c# [modified]

Table of content in c# [modified]

Scheduled Pinned Locked Moved C#
csharphelpasp-netwpf
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sulabh2020
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups