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

Free Support Forum - aspose.com

Working with Paragraph

I have for example this String "

Hello Word

" and I use InsertHtml to put in the document, after I need to return to the paragraph for insert in the beginning other string with bold, for example "My program say:", how I can do that??? thanks


Thank you for your interest in Aspose products. You can try using the following code.

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

//insert html


Hello Word


//get index of current paragraph

int index = builder.CurrentSection.Body.Paragraphs.IndexOf(builder.CurrentParagraph);

//move to previouse paragraph

builder.MoveToParagraph(index - 1, 0);

//write bold text


builder.Font.Bold = true;

builder.Write("My program say:");



Please let me know if you would like to know something else.

Best regards.