Using Word, I created Docx with the standard normal.dot as a test. The difficulty level is Hello-world.
I want to get all the paragraphsthat are written using << 21> " stylein Word.
I can get all the paragraphs, but I donβt know how to filter to heading1.
using (var doc = WordprocessingDocument.Open(documentFileName, false))
{
paragraphs = doc.MainDocumentPart.Document.Body
.OfType<Paragraph>().ToList();
}
source
share