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

Free Support Forum - aspose.cloud

How to add HTML to a blank word document

I want to add html to a blank word document, all formatting and styling has been added in the html. I am using Java for the purpose. Initially, i used a rest post call:
End point: https://api.aspose.cloud/v4.0/words/{filename}/range/id0.0.0?storage={storageName}
Body: { “Text” : “{myHTML}”, “TextType”:“Html”}
This worked fine but now i am getting the following error:
Internal Server Error 500 : {
“Message”: “Object reference not set to an instance of an object.”

I have tried it through postman as well and it gives the same error. As a word around i tried using https://api.aspose.cloud/v4.0/words/{filename}/range/id0.0.0/id0.0.0?storage={storageName} but nothing got added to the document.

Kindly guide how i can added html to first node of the document.


Please share your sample code and input file with us. We will test the scenario and will guide you accordingly.

Furthermore, you can add HTML to Word document using Mail Merge feature. Please check the following documentation article for reference.