• setting Response.contenttype

    Author
    Topic
    #380822

    Does anyone have experience setting Response.contenttype = “application/msword”? I have a Word doc on my server that I’d like to show to a user who is browsing my website. I want him to be able to click on a link that will open a page containing this document. I don’t want him to get the message that he is downloading a file – would he like to open or save it. How can I do this? Does a/o have any sample code?

    Viewing 0 reply threads
    Author
    Replies
    • #639318
      • #639322

        Thanks, but it didn’t answer my basic problem. How can I show this Word doc to my users without making them change settings on their computer? If there are hundreds of users, I can’t make them all change their computer settings.

        Taibe

        • #639324

          As far as I know, there’s not a way to bypass the Open/Save dialog. That’s a security issue that’s built into IE – and undoubtedly will get tighter as more security features are added in future versions.

          Unless you’re sending the user a format that’s native to IE (such as a Graphic or Txt file) or run with a Plugin (such as Flash or QuickTime), the users will always get the Open/Save dialog for file types requiring Extenral viewer applications. You’ll just need to let the user know to click the Open button.

          An alternative is to convert your document into a PDF file. Acrobat DOES act as a Plugin and will not prompt the user for permission to Open or Save. Of course, this may not be an option for your situation, especially if your users need to save and/or edit the Word Doc.

          Hope this helps!

        • #639327

          I’m afraid I think the answer to that is: “With great difficulty”.

          Do they need to be able to edit it? i.e. – is it important that they view it with Word?

          Is converting it to a .pdf an option? You will retain all the formatting, control how the document is viewed, and end up with a smaller file, most likely.

          • #639329

            Actually, it’s not important that it should be in Word at all. The user just needs to view it, not edit the document. The question really is whether to make our client convert all of his word docs to pdfs in order to create this website. Is there an easy way to do this? Does Acrobat have to be purchased in order to do this?

            Thanks for the help,

            Taibe

            • #639333

              I suspect you would be doing your client a favour in getting them to convert all their documents to pdf’s – the hidden information that is passed on in a .doc is frightening and many companies – Microsoft themselves included – have been highly embarrassed.

              (See Protecting Personal Data in Your Microsoft Word Documents.)

              There are free alternatives to Acrobat, but at around $200US it is a reasonable bargain, I think.
              Creating a pdf is no more difficult than printing, and I believe there is a batch convert facility, although I’ve never used it myself.

            • #639419

              Thanks, Leif – good point re: the hidden info. I passed your response on to my boss, and we will seriously consider the pdf option. I hope that there is a batch conversion facility – that will save a lot of tedious work.

              Taibe

    Viewing 0 reply threads
    Reply To: Reply #639327 in setting Response.contenttype

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel