Hi Ruchi,
Thanks for your inquiry. Please note that formatting is applied on a few different levels. For example, let’s consider formatting of simple text. Text in documents is represented by Run element and a Run can only be a child of a Paragraph. You can apply formatting
1) to Run nodes by using Character Styles e.g. a Glyph Style,
2) to the parent of those Run nodes i.e. a Paragraph node (possibly via paragraph Styles)
3) you can also apply direct formatting to Run nodes by using Run attributes (Font). In this case the Run will inherit formatting of Paragraph Style, a Glyph Style and then direct formatting.
Document doc = new Document(MyDir + “in.docx”);<o:p></o:p>
Paragraph paragraph = (Paragraph)doc.GetChild(NodeType.Paragraph, 0, true);
//Change the size of paragraph
paragraph.ParagraphFormat.Style.Font.Size = 11.0;
//Change the size and bold formatting of Run node (part of paragraph's text)
paragraph.Runs[0].Font.Size = 14.0;
paragraph.Runs[0].Font.Bold = true;