Converting HTML to Word Format (doc, docx or rtf)

Posted on 2007-10-05
Last Modified: 2015-10-08
Hi Experts,

I am in need of a technique or component that will allow me to convert an HTML output to a format readable with Microsoft Word. Basically a user creates a CV and then has the choice of downloading it in either PDF or Word formats. I have done the PDF without a hitch with a scheduled convertor residing on the server. I was hoping for a similar technique with the Word files but have been unsuccessful in locating the software.

Any help would be appreciated
Question by:wooderz
    LVL 69

    Expert Comment


    Expert Comment

    I have not tried this,
    Look at this,
    LVL 9

    Expert Comment

    <html xmlns:o="urn:schemas-microsoft-com:office:office"

        Response.ContentType = "application/msword"

    Author Comment


    This just opened up in Internet Explorer. Looked great, but wasn't MS Word. How would I go about getting this into MS Word?
    LVL 9

    Accepted Solution

    Try adding a content disposition:
        Response.ContentType = "application/msword"
    Response.AddHeader "Content-Disposition", "filename=*.doc"
    LVL 25

    Assisted Solution

    just to further dana's logic:

    Sub createWord(sFName)
          Response.Buffer = True
          server.ScriptTimeout = 3000
          Response.ContentType = "application/"
          Response.AddHeader "content-disposition", "attachment; filename = "&sFName
    End Sub

    just pass the filename you want it named to this

    Expert Comment

    Ridiculous answers, all you are looking for is a straight forward converter, not having to write in code. I don't know why some on here even bother to answer with ridiculous comments.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Javascrip And asp.Net vb help needed 2 45
    firstChar challenge 13 57
    wordappend challenge 8 51
    Using querystring in a hyperlink 3 10
    A short article about a problem I had getting the GPS LocationListener working.
    Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now