As a business requirement I have to use the same style which client provided to us to generate Word report. I have to print a paragraph by applying a style called "Appendix 1". I used the same template and I am able to apply the same style but it is not getting reflected.
Here I am pasting the piece of code.
Aspose.Words.Style listStyle = wDoc.Styles["Appendix 1"];
Aspose.Words.Paragraph par = dbDoc.CurrentParagraph;
par.ParagraphFormat.Style = listStyle;
and also I used like this
//dbDoc.ParagraphFormat.StyleName = "Appendix 1";
//dbDoc.CurrentParagraph.ParagraphFormat.StyleName = "Appendix 1";
and also like this
/Style myStyle = wDoc.Styles.Add(StyleType.Paragraph, "MyStyle1");
//Aspose.Words.Lists.List list2 = wDoc.Lists.Add();
//dbDoc.ListFormat.List = list2;
But it is not worked for me
Please help to resolve this.