5
Answers

How to get Numbered Heading list in word using VSTO.

I can get only heading without Number.
 
Here is my code.
 
Selection wordSelection = Globals.ThisAddIn.Application.Selection;
wordSelection.set_Style(WdBuiltinStyle.wdStyleHeading1);
 
But How can I get Numbered Headings. Please anyone can send me the code.It is urgent for me now..
I want like
 
1 Heading
 
   1.1   Heading
 
           1.1.1 Heading 
 
Like this Please send me the code..I am wating. 

Answers (5)

0
Photo of HumptyNotSoDumpty
NA 23 0 20y
What a muppet (me that is!). I did get close, but must be going mad! Cheers so much
0
Photo of james
NA 1.1k 313k 20y
If (Test1 = true) || (Test2 = true) Then _____MessageBox.Show("HelloWorld") Else _____MessageBox.Show("GoodbyeWorld") End If || = logical Or && = logical And