If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > open a word document as Read-Only

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-05, 07:25
faamugol faamugol is offline
Registered User
 
Join Date: Mar 2004
Posts: 58
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
Reply With Quote
  #2 (permalink)  
Old 03-06-05, 17:23
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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.....
Reply With Quote
  #3 (permalink)  
Old 03-07-05, 17:24
Bullschmidt Bullschmidt is offline
Guru
 
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
Reply With Quote
  #4 (permalink)  
Old 03-07-05, 17:26
Bullschmidt Bullschmidt is offline
Guru
 
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
Reply With Quote
  #5 (permalink)  
Old 03-07-05, 17:30
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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....
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On