We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Hanging Indentation being appplied to custom Style

I have created a custom style in a template word document, this style does not apply any indentation. I apply the style to my paragraph through the CurrentParagraph.StyleName property. But when the word document is created, it has aplied my custom style but has also appended Hanging 4.4cm to the style, tus creating a new style.

I have atached a copy of the word coument that is produced and a copy of the code that builds the document. The bit of code that generates the hanging text is in the CreateNonHeaderRow method.


Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. As I can see, you are assigning style using the following line of code:

builder.ParagraphFormat.StyleName = "MoLARInsuringClause";

unfortunately, I cannot reproduce the problem on my side. Please attach your template document, I will try to reproduce the problem and provide you more information. In addition, it would be great if you simplify your code.

Best regards.

I have atteached the template docuement as requested. Thanks

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You can resolve this issue using the following code:


builder.ParagraphFormat.StyleName = "MoLARInsuringClause";

Just clear formatting before applying custom style.

Hope this helps,

Best regards.

That worked. Many thanks.