Click here to Skip to main content
15,887,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
function OpenFile(){
alert ('Work');
//would like to modify ActiveXObject with any other object for cross-browser.
var x = new ActiveXObject("WScript.Shell");
x.run('winword.exe');
}
//Above code works only in IE. But don't want to use activeXObject.
//Is there any possibility to open a word file in Internet Explorer
//without using activexobject. Request for a solution.
Posted

1 solution

I have tried this sometime back but then this is not actually that easy, there is whole set of functionality that comes up with an application like Excel/Word.

Ultimately displaying excel or word on client machine is a mess, I tried and got stuck in executing macros.

There is nothing to my knowledge that would allow word/excel to be given in all the browser, even AcitveX objects wont let you use most of the functionality.

Try find some other solution if possible, I has to display a PremiumCalculator excel in webpage instead of letting people download the same, I went ahead and created a PremiumCalculator in asp.net, instead of displaying the existing sheet in web browser.
 
Share this answer
 
Comments
Member 10331994 13-Oct-13 7:48am    
Hi ehsan assu, Thanks for the suggestion you provided. But the same answer I got from StackOverflow. In fact I only posted the same question on StackOverflow also. So please let me know any other possible solutions.

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