|
-
Oct 11th, 2007, 03:45 AM
#1
Thread Starter
Fanatic Member
[2005] open word document in asp.net webform
i want to open a word document as readonly in asp.net webform
i am using the below code. but an error is generated
Dim ObjOffice As New Word.Application
ObjOffice.Documents.Open(FileName, , True, , , , , , , , , True)
ObjOffice.Activate()
error - "Cannot activate application"
how to go about it.
-
Oct 11th, 2007, 02:11 PM
#2
Re: [2005] open word document in asp.net webform
That code will attempt to open the word document in-memory on the server, not on the browser. You need to display the doc file on the client's machine. To do this, set up an IFRAME or frame on your page and set the source of the IFRAME/frame to be the location of the DOC file (http location of course). If the user's browser has the plugins to read the DOC file, it'll be displayed in the browser, else they will be prompted for a download.
In either case, any changes they make to the doc file will be local to them and will not be saved back to the server.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|