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

Free Support Forum - aspose.com

Paragraph After space not picking from Merge Codes


I have a Merge Code in a Template, and I am inserting content using ‘InsertHtml’ method.

But, the issue is - the spacing after defined in MergeCoede in Word, is not reflected when I use Merge Contents using Aspose Library.

Below are the codes snippet-

string content = “Sample Contents”;

Document newDoc = new Document();
DocumentBuilder dB = new DocumentBuilder(newDoc);

MemoryStream mSteam = new MemoryStream();
newDoc.Save(mSteam, SaveFormat.Docx);



Thanks for your inquiry. Please attach the following resources here for testing:

  • Please share some more detail about MergeCode.
  • Your input Word document if you are using any
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the ** expected output** Word file that shows the desired behavior.
  • In your shared code, you are simply inserting HTML into document. Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.