5
Utilizzo di Word Ho creato un Docx con normal.dot standard come test. Ciao livello mondiale complessità.Open XML: Word - Ottenere tutti i paragrafi contrassegnati come stile "Titolo1"
Desidero ottenere all the paragraphs
che sono in stile "Heading1
" style
in Word.
Posso ottenere tutti i paragrafi, ma non so come filtrare fino a Titolo1.
using (var doc = WordprocessingDocument.Open(documentFileName, false))
{
paragraphs = doc.MainDocumentPart.Document.Body
.OfType<Paragraph>().ToList();
}
ottengo un'eccezione null, solo aggiunto:! = Null && p.ParagraphProperties.ParagraphStyleId – Kiquenet