Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
MS office works properly in Compile time that is when the project is not deployed, but after Deployment it doesn't work.
No action is seen after user clicks on menu bar option plz guide me.

Here's my code:
C#
{
//Process p = null;
try
{
   System.Diagnostics.ProcessStartInfo runMe = new System.Diagnostics.ProcessStartInfo();
   runMe.FileName = "WINWORD.EXE";
   System.Diagnostics.Process.Start(runMe);
}
catch (Exception ex)
{
   Response.Write("<script>alert('Microsoft Word is not installed.');</script>");
}
ClientScript.RegisterStartupScript(this.GetType(), this.UniqueID, "window.close();", true);
}
Posted
Updated 23-Apr-11 3:39am
v2

1 solution

First thing to check: do you have office installed on the PC you deployed to? Because if you don't, your app will not work...
Even if you do, you do realize that the WinWord window will open on the Server, not the Client, right?
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 23-Apr-11 22:51pm    
:-). A 5.
--SA
Vandana87 27-Apr-11 0:51am    
i know that winword will work on server site & the PC on which i am deploying the project is having MS word&MS excel,so plz give me an alternative the same.
that is how to solve the issue after deployment.
OriginalGriff 27-Apr-11 2:59am    
You can't.

Security stops you from running applications on the client from the server: that is called "Probable Virus Activity"...

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