- Code: Select all
wordDocumentPackage = new WordprocessingMLPackage();
wordDocumentPart = new MainDocumentPart();
wordDocumentPackage.addTargetPart(wordDocumentPart);
I am programmatically processing an XML input file, using xpath to grab the input data I need.
I need to create styled paragraphs in the output Word document, and I need to create a style definition to paragraphs on the fly.
Now, for some reason, you have to have styles defined before you add a Paragraph which references it. ...