Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    58

    Unanswered: open a word document as Read-Only

    Dear members,

    I would like to open a word docment as Read-only in ASP . Is it self possible ??

    Here is the code I use


    Response.ContentType = "text/plain"
    Response.AddHeader "content-disposition", "attachment; filename=mon_fichier.doc"



    Thank you in advance

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    The ultimate answer is no, not really. You are effectively downloading the document to the users machine, you have no control over what they do once it is down there.

    You could use pdf to do it.....

  3. #3
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    <<
    I would like to open a word docment as Read-only in ASP . Is it self possible ??
    >>

    Just a regular link to a Word doc should let the user open it up. And he's probably NOT going to be able to save it back to the Web site.

    And of course you could set the Word doc's read-only property from Windows Explorer (right-click...) but a user could easily save the file to his hard drive and then uncheck the attribute and then make changes to the file on his own PC.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    And some related resources:

    Article: Dynamically Writing Office Documents
    http://www.infinetsoftware.com/conte...edocuments.asp
    Response.ContentType = "application/msword"
    Response.AddHeader "Content-Disposition", "attachment;filename=receipt.doc"

    Build an Easy Maintenance Intranet Site: Using Office Docs, File System Object, and OLE Structured Storage by Josef Finsel
    http://msdn.microsoft.com/msdnmag/issues/0300/fso/
    Assumes that a directory can be allowed access to only the human resources dept.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  5. #5
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Yeah, good point, unless you provide a specific function they will not be able to save the document back tot he server so the server version is effectively read only but once it is downloaded you are basically stuffed....

Posting Permissions

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