This project has moved. For the latest updates, please go here.

Get section in Word

Aug 29, 2012 at 1:11 PM

Currently, the word document have one table and one section title. The section title is above on the table. I used following code to get the table, the problem is how to get the section object based on retrieved table objcect?

Word.Application wordApplication = new Word.Application();
            Word.Document newDocument = wordApplication.Documents.Open(@"C:\Users\john\Documents\Visual Studio 2010\Projects\WindowsFormsApplication3\WindowsFormsApplication3\BBB.doc");

            // read text of document
var table = newDocument.Tables[1];