OpenXML 2 SDK - Word document - Create bulleted list programmatically
Using the OpenXML SDK, 2.0 CTP, I am trying to programmatically create a Word document. In my document I have to insert a bulleted list, an some of the elements of the list must be underlined. How can I do this? Lists in OpenXML are a little confusing. There is a NumberingDefinitionsPart that describes all of the lists in the document. It contains information on how the lists should appear (bulleted, numbered, etc.) and also assigns and ID to each one. Then in the MainDocumentPart , for every item in the list you want to create, you add a new paragraph and assign the ID of the list you want to