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

Free Support Forum - aspose.com

Rendering Word in Html5 WYSIWYG Editor

Hello,

I am looking to use Aspose word library to render word to html and convert the edited html back to word. Has anyone else done the same? How doesn't it work?

Thanks
K
Hi Ketan,

Thanks for your inquiry. Yes, you can convert Word document to Html and then Html to Word document after modification using Aspose.Words. Please note that Aspose.Words mimics the same behavior as MS Word does.

Following code example shows how to convert one document into another.

Document doc = new Document(MyDir + "in.docx");

doc.Save(MyDir + "Out.html", SaveFormat.Html);

Document doc = new Document(MyDir + "in.html");

doc.Save(MyDir + "Out.docx", SaveFormat.Docx);

Thanks Tahir,


I have an additional question, I am attempting mail merge and part of my merge is using word if statement. I am noticing that Aspose does not merge the content of the if or else clause. So the place holders in the if or else clause look like the mailmerge fields instead of being replaced with data. <>.

Is that intentional or am i doing something wrong?
Hi Ketan,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does.

Aspose.Words does not populate merge fields inside false part of IF field. The cleanup options are not applied too. So, false part of IF field remains unchanged, like in MS Word mail merge preview. Hope this answers your query.

If you still face problem, please share your input, output and expected output documents along with code example to reproduce this issue at our end. We will investigate this issue and provide you more information on this.

Actually, I am running in to a situation where the true part of the if statement is not being merged. The content of the IF statement is being displayed verbatim.

Hi there,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • 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 them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.