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

Free Support Forum - aspose.com

How to set font constatnly to entire word document using aspose.words?

iam importing html content in to current word document and merging current document to destination document.....iam not getting which font it is taking pls let me know how to check?

oDocBuilder = new DocumentBuilder(oCurrentDoc);


if (oCurrentDoc.ChildNodes.Count > 0)


oCurrentDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;

foreach (Section srcSection in oCurrentDoc)


Section newSection = (Section)oDestDoc.ImportNode(srcSection, true, ImportFormatMode.KeepSourceFormatting);





Thanks for your request. Content inserted by Insert HTML does not inherit formatting specified in DocumentBuilder options. Whole formatting is taken from HTML snippet. If you insert HTML with no formatting specified, default formatting is used for inserted content.

Also if you looking to combine all formatting from the DocumentBuilder or another node automatically (like how InsertHtml behaved like in older versions) then you may want to look into using this code work around:


Also you can try using FontChanger class from this post to change a font for a whole document:


//Open document

Document sourceDoc = new Document("in.doc");

// Create an object that inherits from the DocumentVisitor class.

FontChanger changer = new FontChanger("Arial");

//Get the model to accept a visitor.

// The model will iterate through itself by calling the corresponding methods

// on the visitor object (this is called visiting).


//Save output document


Please let us know if you need more information, we will be glad to help you.

Best regards,