2
Answers

How to get Numbered Headings as in word using c# code.

I am preparing a word document using C#.I am using Microsoft.Office.Interop.Word.I got stuck while numbering the paragraphs.

Suppose I have to print like this in the word document.

1. Heading1

some text is here



1.1 Sub heading1

some text is here



1.1.1 Sub heading2

some text is here



2. Heading2

some text is here



Please help me. I have tried so many things but not able to do that.

Answers (2)

1
Photo of Prasham Sabadra
NA 17.6k 1.2m 8y
Hi Venkat,
Please try this
<script src=”/_layouts/SP.js” type=”text/ecmascript”></script> 
Accepted
1
Photo of Ramesh Palaniappan
NA 13.2k 722.6k 8y
Please add this line to call your function
  1. ExecuteOrDelayUntilScriptLoaded(myjsfucntion,"sp.js");