@Shyamu When you use insertParagraph
method Aspose.Words inserts a paragraph break at the current cursor location, the cursor is moved to the beginning of the new paragraph. If you start writing text right after, the text will be placed in this new paragraph. For example see the following code:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.write("This is text placed in one paragraph");
// This line inserts a paragraph break and the cursor is placed at the beginning of the next paragraph
builder.writeln(); // You can also use insertParagraph
// Here we write some text and insert a paragraph break after it.
// The cursor is placed at the beginning of the next paragraph again
builder.writeln("This is the next paragraph");
// Now insert one more paragraph break to have an empty paragraph.
builder.writeln(); // You can also use insertParagraph
// Write some text.
builder.write("There is an empty paragraph before this paragraph.");
doc.save("C:\\Temp\\out.docx");