none
Can we manage ms word formats using html commands? RRS feed

  • Question

  • I am going to generate a word document according to html page. I need some formatting like page break and customize heading of the document such as .can i achieve them using html?
    Friday, November 23, 2012 8:14 AM

Answers

  • I think it can't be done. As the markup language of Word document is different from HTML.

    But there are converters to convert HTML into Word document.


    Regards,
    Fermin
    What's life without whimsy?


    Friday, November 23, 2012 1:05 PM
  • Hi Dinidu

    I concur with Fermin, but...

    Word does have an undocumented "round-trip" html vocabulary. Word documents saved as HTML will contain all the information that will allow Word to open them again with no loss, yet allow the documents to be displayed in a Browser window.

    So what you want to do is theoretically possible, but, as I said, undocumented. What you could do is create a Word document with the characteristics you'd like to have, save it to the HTML file format, then analyze how Word does it and incorporate that into your HTML.


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, November 23, 2012 5:07 PM
    Moderator

All replies

  • I think it can't be done. As the markup language of Word document is different from HTML.

    But there are converters to convert HTML into Word document.


    Regards,
    Fermin
    What's life without whimsy?


    Friday, November 23, 2012 1:05 PM
  • Hi Dinidu

    I concur with Fermin, but...

    Word does have an undocumented "round-trip" html vocabulary. Word documents saved as HTML will contain all the information that will allow Word to open them again with no loss, yet allow the documents to be displayed in a Browser window.

    So what you want to do is theoretically possible, but, as I said, undocumented. What you could do is create a Word document with the characteristics you'd like to have, save it to the HTML file format, then analyze how Word does it and incorporate that into your HTML.


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, November 23, 2012 5:07 PM
    Moderator