While replacing a specified syntax with a document I want the main documents Style font everything to be applied

Ok I got it for that particular document its fine I tried in different documents which has different style but even there same calibri is applied…

Now my one more question is isit possible to apply the style and font of regex expression to the replaced content

@Keerthana_K_R When you replace content with simple text, like this:

doc.Range.Replace("placeholder", "replacement");

The replacement text will use formatting of the matched node. You can also specify formatting of the replacement in FindReplaceOptions. For example if run the following code, the replacement text will be red:

Document doc = new Document(@"C:\Temp\in.docx");
FindReplaceOptions opt = new FindReplaceOptions();
opt.ApplyFont.Color = Color.Red;
doc.Range.Replace("placeholder", "replacement", opt);
doc.Save(@"C:\Temp\out.docx");

In your case however, since you are using InsertDocument method, formatting is not inherited from the match node. If you need to replace font of the whole document before inserting it into another document, you can use code like this:

Document doc = new Document(@"C:\Temp\in.docx");
doc.Accept(new FontChanger("Times New Roman"));
internal class FontChanger : DocumentVisitor
{
    public FontChanger(string fontName)
    {
        mFontName = fontName;
    }

    /// <summary>
    /// Called when a FieldEnd node is encountered in the document.
    /// </summary>
    public override VisitorAction VisitFieldEnd(FieldEnd fieldEnd)
    {
        //Simply change font name
        ResetFont(fieldEnd.Font);
        return VisitorAction.Continue;
    }

    /// <summary>
    /// Called when a FieldSeparator node is encountered in the document.
    /// </summary>
    public override VisitorAction VisitFieldSeparator(FieldSeparator fieldSeparator)
    {
        ResetFont(fieldSeparator.Font);
        return VisitorAction.Continue;
    }

    /// <summary>
    /// Called when a FieldStart node is encountered in the document.
    /// </summary>
    public override VisitorAction VisitFieldStart(FieldStart fieldStart)
    {
        ResetFont(fieldStart.Font);
        return VisitorAction.Continue;
    }

    /// <summary>
    /// Called when a Footnote end is encountered in the document.
    /// </summary>
    public override VisitorAction VisitFootnoteEnd(Footnote footnote)
    {
        ResetFont(footnote.Font);
        return VisitorAction.Continue;
    }

    /// <summary>
    /// Called when a FormField node is encountered in the document.
    /// </summary>
    public override VisitorAction VisitFormField(FormField formField)
    {
        ResetFont(formField.Font);
        return VisitorAction.Continue;
    }

    /// <summary>
    /// Called when a Paragraph end is encountered in the document.
    /// </summary>
    public override VisitorAction VisitParagraphEnd(Paragraph paragraph)
    {
        ResetFont(paragraph.ParagraphBreakFont);
        return VisitorAction.Continue;
    }

    /// <summary>
    /// Called when a Run node is encountered in the document.
    /// </summary>
    public override VisitorAction VisitRun(Run run)
    {
        ResetFont(run.Font);
        return VisitorAction.Continue;
    }

    /// <summary>
    /// Called when a SpecialChar is encountered in the document.
    /// </summary>
    public override VisitorAction VisitSpecialChar(SpecialChar specialChar)
    {
        ResetFont(specialChar.Font);
        return VisitorAction.Continue;
    }

    private void ResetFont(Aspose.Words.Font font)
    {
        font.Name = mFontName;
    }

    private string mFontName = "Arial";
}

@alexey.noskov could you tell me how to extract the commonly used style font everything of a document

@Keerthana_K_R You can access document styles via Document.Styles collection. You can also access font formatting of individual nodes using Inline.Font property. Default font used by the document is accessible through StyleCollection.DefaultFont property.