I think by Aspose.Words to modify the existing Word document format a paragraph- can you give an example

I think by Aspose.Words to modify the existing Word document format a paragraph, can you give an example.I have the code, but test results have not changed successfully.

foreach (Aspose.Words.Paragraph p in doca.Sections[0].Body.Paragraphs)
{
   p.ParagraphFormat.Style.Font.Size = 18;
   p.ParagraphFormat.Style.Font.Italic = true;
}

Hi Ponnamma,

Thanks for your inquiry and sorry for the delayed response. Please use the following code snippet for your requirements.

Document doc = new Document(MyDir + "in.docx");
foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
{
    NodeCollection runs = para.GetChildNodes(NodeType.Run, true);
    foreach (Run run in runs)
    {
        // Change the font setting
        run.Font.Bold = true;
        run.Font.Size = 10;
        run.Font.Name = "Arial";
    }
}

You can also use DocumentBuilder to format the document’s text. Please read following documentation links for your kind reference.

https://docs.aspose.com/words/net/document-builder-overview/
https://docs.aspose.com/words/net/programming-with-documents/
https://docs.aspose.com/words/net/applying-formatting/
https://docs.aspose.com/words/net/navigation-with-cursor/
https://reference.aspose.com/words/net/aspose.words/paragraph/
https://reference.aspose.com/words/net/aspose.words/run/

Please let us know if you have any more queries.