foreach (Microsoft.Office.Interop.Word.Paragraph paragraph in oMyDoc.Paragraphs ) { Microsoft.Office.Interop.Word.Style style = paragraph.get_Style() as Microsoft.Office.Interop.Word.Style; string styleName = style.NameLocal; string text = paragraph.Range.Text; if (styleName == "Title") { title = text.ToString(); } else if (styleName == "Subtitle") { st = text.ToString() + "\n"; } else if (styleName=="Heading 1") { heading1[h1c] = text.ToString()+"\n"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)