Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    setting Response.contenttype

    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?

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: setting Response.contenttype


  3. #3
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: setting Response.contenttype

    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

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: setting Response.contenttype

    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!

  5. #5
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: setting Response.contenttype

    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.

  6. #6
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: setting Response.contenttype

    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

  7. #7
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: setting Response.contenttype

    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.

  8. #8
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: setting Response.contenttype

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •