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

Free Support Forum - aspose.com

Keeping comments when converting from html

I have comments specified in my html that I am converting to word. However the comments don’t look nice when converted to word. They are not shown as a comment bubble, but rather as a link that when clicked goes to the bottom of the document that has comment text.
Is there a way to write the html so that when aspose converts it to word, it will have nice and proper word style comments?
To do some research I did:
-I tried creating a comment using aspose, generating a word doc and it looked good.
-I tried creating a comment using aspose and saving it as html. It did not look good.
-I tried creating a Document using that html and it did not look good.

My goal is for aspose to be able to use an externally created html that includes comments to create a word doc with word style comments.

Thanks,
Tirtza

Hi Tirtza,


Thanks for your inquiry. Please check the attached input Word document and output Html for your kind reference. Your html should be like Out.html. Please check the styles starts with -aw-comment-* in Out.html. Hope this helps you.

Please let us know if you have any more queries.

I see you have an in.docx and Out.docx. The in.docx has the comments how I want them formatted. However the in.dox has the comments exactly how I don’t want them and that’s what I am getting when i convert from html to word. I’m assuming that by the names of the file (in and out), you created in then outputted it as html and then used that html to create out with aspose. That’s exactly what I did and that’s the problem- out’s comments does not look like in’s comments.

Hi Tirtza,


Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. The comments in Word documents are exported to HTML as footnotes just like Microsoft Word does during saving a Word document to HTML.

Could you please share following documents here for our reference? We will then provide you more information about your query along with code.

  • Your input Html containing the comments
  • Please attach the output Word file that shows the desired behavior.

Please see attached documents. Note that when you open the htm in word, it is viewable as nice word formatted comments. That’s how I want them to look when aspose converts from html to word.

Hi Tirtza,

Thanks for sharing the detail. Please note that MS Word format and HTML formats are quite different so sometimes it's hard to achieve 100% fidelity.
teloscor:
Is there a way to write the html so that when aspose converts it to word, it will have nice and proper word style comments?
Your html should be like Out.html (shared in my first post in this forum thread). Please check the styles starts with -aw-comment-* in Out.html. You need to modify your input html to get the required output.

If your input html documents are like "comment.htm", please let us know. We will log a ticket for this feature in our issue tracking system.