Using Novacode DocX, I can add a paragraph with a heading of 1 as follows:
var p = docX.InsertParagraph("My Heading"); p.StyleName = "Heading1";
But I canโt add a โTitleโ style:
var p = docX.InsertParagraph("My Heading"); p.StyleName = "Title";
I looked into the generated Xml files and I see that the "Heading" style is not in the Styles.xml file, whereas if I set it as the heading style in Word and saved, then the heading style will appear in the styles of the Xml file.
So, how do I get DocX to include the Title style, or how do I add style to the DocX styles?
source share