Click here to Skip to main content
15,894,955 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi.
How to open a word document in winword and when the user closes the document save on server automatically? by asp.net c#
Posted
Comments
Rajesh Anuhya 21-Jun-13 7:53am    
Where do you want to open it, in server?

You can't.
C# code is executed at the server, not the client, so all calls to Process.Start cause the application to run on the server - where the client can't see it, much less make changes.

Except in very, very specific circumstances you cannot cause any application (installed or not) to run on the client machine from the server (and those circumstances do not apply in 99.99% of installations as they require IE and ActiveX enabled)

Think about it: the client could be on a PC, MAC, Android phone, or even an internet enabled fridge. Even if you could execute Word on the client, you have no guarantee that it is installed, or will even work on that processor under that operating system.
 
Share this answer
 
You can use google docs for this purpose. it will let you open any format easily

HTML
<iframe src="http://docs.google.com/viewer?url=www.xyz.com/abc.doc&embedded=true" width="600" height="780" style="border: none;"></iframe></iframe>


give its runat property as server ,and provide an id for this ,after that you can bind it easily from you codebehind.

https://docs.google.com/a/ati-erp.com/viewer[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900