Now i understand that Server files cannot be edited from the websites.
Is there any other way,i can do,for example,
Prompt user to open the required file,edit the word document,save the document and than copy the latest or the saved one to the server,so all the other process is done.
Can you please provide some samples for this or else i will close this ,if this cannot be done at all,in any ways.
Thank you
Vega Vilas
Please Mark As Answer if this reply helps you.
Its possible . You can achieve this ussing third party tool like Text control (
http://www.textcontrol.com).
What is possible? You're showing a link to a third party tool, which allows you to edit (among other things) to edit a Word document on the server. But you can't do what is asked here....
I know this is a bit late, but there is a *real* solution to this problem, although its far from perfect.
Step 1) The file to be edited must be available on the web server and able to be accessed using the WebDav protocol. If you deal with *real* documents this is easy, in our case where we store our documents in the database we make a local temp copy.
Step 2) And this only works in IE, you can fire up MS Word using an Active X control which allows MS Word to access a document over WebDav for edit.
<body onload="startWord('https://bastest.balen.co.uk/Documents/0AABCA9E-88FA-479A-8B98-09DC1DD606EC.doc')">
<a href="javascript:startWord('https://bastest.balen.co.uk/Documents/0AABCA9E-88FA-479A-8B98-09DC1DD606EC.doc')">Open Generated File</a>
<script type="text/javascript" language="JavaScript">
function startWord(strFile)
{
var myApp = new ActiveXObject("Word.Application");
if (myApp != null)
{
myApp.Visible = true;
myApp.Documents.Open(strFile);
}
}
</script>
</body>
Step 3) [If using temp files only] Write a small server side server (could be a thread that is kicked off in application_start) which monitors the MS Word files for changes, when the user saves the document the monitor picks it up and save them back to the
database or moves the file or whatever.
As I said, not perfect, but works reasonable well, so long as your users use IE.
VegaVilas
Member
34 Points
57 Posts
Re: Open/Edit a word document on a web page
Apr 21, 2010 05:03 PM|LINK
Thank you so much hans for your time in replying.
Now i understand that Server files cannot be edited from the websites.
Is there any other way,i can do,for example,
Prompt user to open the required file,edit the word document,save the document and than copy the latest or the saved one to the server,so all the other process is done.
Can you please provide some samples for this or else i will close this ,if this cannot be done at all,in any ways.
Thank you
Please Mark As Answer if this reply helps you.
hans_v
All-Star
35998 Points
6551 Posts
Re: Open/Edit a word document on a web page
Apr 21, 2010 10:02 PM|LINK
I already gave you a link how to do this
You cannot automate this. It is up to the user if they want to upload the saved document
Ratndeep
Member
323 Points
142 Posts
Re: Open/Edit a word document on a web page
Dec 09, 2011 06:11 AM|LINK
Its possible . You can achieve this ussing third party tool like Text control ( http://www.textcontrol.com).
Keep Trying
.
hans_v
All-Star
35998 Points
6551 Posts
Re: Open/Edit a word document on a web page
Dec 09, 2011 06:55 AM|LINK
What is possible? You're showing a link to a third party tool, which allows you to edit (among other things) to edit a Word document on the server. But you can't do what is asked here....
Ratndeep
Member
323 Points
142 Posts
Re: Open/Edit a word document on a web page
Dec 09, 2011 08:35 AM|LINK
@hans_v,
Pl have a look here http://www.textcontrol.com/en_US/products/dotnetserver/overview/article/browser/
Keep Trying
.
jitendra_fay...
Member
112 Points
59 Posts
Re: Open/Edit a word document on a web page
Nov 02, 2012 06:33 AM|LINK
Hi,
I have done one example for this , hope this will help you.
follow my article in this link-
http://steptodotnet.blogspot.in/2012/11/how-to-edit-word-document-using-aspnet.html
Try this and let me know.
CoolKiwiBlok...
Participant
789 Points
173 Posts
Re: Open/Edit a word document on a web page
Nov 23, 2012 09:54 PM|LINK
I know this is a bit late, but there is a *real* solution to this problem, although its far from perfect.
Step 1) The file to be edited must be available on the web server and able to be accessed using the WebDav protocol. If you deal with *real* documents this is easy, in our case where we store our documents in the database we make a local temp copy.
Step 2) And this only works in IE, you can fire up MS Word using an Active X control which allows MS Word to access a document over WebDav for edit.
<body onload="startWord('https://bastest.balen.co.uk/Documents/0AABCA9E-88FA-479A-8B98-09DC1DD606EC.doc')"> <a href="javascript:startWord('https://bastest.balen.co.uk/Documents/0AABCA9E-88FA-479A-8B98-09DC1DD606EC.doc')">Open Generated File</a> <script type="text/javascript" language="JavaScript"> function startWord(strFile) { var myApp = new ActiveXObject("Word.Application"); if (myApp != null) { myApp.Visible = true; myApp.Documents.Open(strFile); } } </script> </body>Step 3) [If using temp files only] Write a small server side server (could be a thread that is kicked off in application_start) which monitors the MS Word files for changes, when the user saves the document the monitor picks it up and save them back to the database or moves the file or whatever.
As I said, not perfect, but works reasonable well, so long as your users use IE.