M
msnews.microsoft.com
We have a add-in in word 2007.
i want to know how to capture the heading in the selected page?
For examlple,:
============================
1 Heading 1
1.1 Heading 2
.......
.......
2 Heading 1
2.1 Heading 2
==============================
i want to capture the "Heading 1" when the cursor is moved to the first
line.
i try
Globals.ThisAddIn.Application.ActiveDocument.Sections[1].Headers[Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage].Range.Text;
but it failed.
Any suggestion is very appreciated!!!
i want to know how to capture the heading in the selected page?
For examlple,:
============================
1 Heading 1
1.1 Heading 2
.......
.......
2 Heading 1
2.1 Heading 2
==============================
i want to capture the "Heading 1" when the cursor is moved to the first
line.
i try
Globals.ThisAddIn.Application.ActiveDocument.Sections[1].Headers[Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage].Range.Text;
but it failed.
Any suggestion is very appreciated!!!