I am passing input for Indentation and hanging from UI. I used below code but its not working kindly help me asap.
Please find input and expected output word document.
Input_hedding1.docx (13.0 KB)
Expected_output_hedding1.docx (13.0 KB)
public static void Hedding1(Document doc)
{
var LeftIndent = 0.15;
var Hannging = -0.5;
Style heading1 = doc.Styles[StyleIdentifier.Heading1];
//heading1.ParagraphFormat.LeftIndent = ConvertUtil.InchToPoint(A);
//heading1.ParagraphFormat.FirstLineIndent = ConvertUtil.InchToPoint(B);
//please note Indentation and hanging should be dynamic
heading1.ParagraphFormat.FirstLineIndent = ConvertUtil.InchToPoint(Hannging);
heading1.ParagraphFormat.LeftIndent = ConvertUtil.InchToPoint(LeftIndent) - heading1.ParagraphFormat.FirstLineIndent;
}