Issues with HTML formatting tags

Hello Team,

Please take a look at the attached document for above mentioned subject.

Best Regards,

Dwarika

Hi
Thanks for your request. You should use InsertHtml method in this case. Please see the following code:

// Create document and documentbuilder
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Aspose.Words.Font font;
Paragraph paragraph;
Run run;
// Create new text object of aspose
// reportDocument is the Aspose document object.
run = new Run(doc);
font = run.Font;
paragraph = new Paragraph(doc);
// Add text object to paragraph
paragraph.AppendChild(run);
// Create New Shape as text box
Shape textBox = new Shape(doc, ShapeType.TextBox);
textBox.Width = 100;
textBox.Height = 100;
// Assign paragraph to shape
textBox.AppendChild(paragraph);
// Insert texybox into the document
doc.FirstSection.Body.FirstParagraph.AppendChild(textBox);
// Insert HTML formated text
builder.MoveTo(run);
builder.InsertHtml("<b>Test Text</b>");
// Save output document
doc.Save(@"Test072\out.doc");

Also, see the following link to learn more about InsertHtml method.
https://reference.aspose.com/words/net/aspose.words/documentbuilder/inserthtml/
Hope this helps.
Best regards.