I'm basing a new document on a Word template that has custom styles defined for different levels within a multi-level list.
To insert the multi-level list data into the document I loop through the collections and set the appropriate custom list style for the level of the list. When the document is created my list has no formatting. How can I do this? Below is my current code:
foreach (var module in modules)
builder.ParagraphFormat.StyleName = "MyCustomLevel1";
foreach (var location in module.Locations)
builder.ParagraphFormat.StyleName = "MyCustomLevel2";
foreach (var item in location.Items)
builder.ParagraphFormat.StyleName = "MyCustomLevel3";