I need a suggestion to clarify my thought.Now I am working on a Web application in ASP.NET MVC5 with Angularjs as the front end framework. Is there any way to open client side application like MS Word/Outlook using any scripting languages like jquery,ajax,angularjs etc.
Asked
Active
Viewed 122 times
0
-
1Not from a browser based application. From something like an Electron app, yes. – Randy Casburn Jun 12 '19 at 05:10
-
1sure, generate a link to a word document on your server and get the user to click on it? – Caius Jard Jun 12 '19 at 05:14
2 Answers
2
Yes you can open any MS-WORD document using ActiveXObject
.
Following is the sample code to print file data on webpage.
var w=new ActiveXObject(‘Word.Application’);
if (w != null)
{
w.Visible = true; //set to false to stop the Word document from opening
obj=w.Documents.Open("C:\\blank.doc"); //this can be any location on your PC, not just C:
docText = obj.Content;
w.Selection.TypeText("Hello world!");
w.Documents.Save();
document.write(docText);//Print on webpage
For more information you can refer here.

iamrajshah
- 963
- 1
- 11
- 23
-
@Strom have you gone through the link mention in answer?? It seems it will work, or if you think it will not, can you please tell us why it will not going to work?? – iamrajshah Jun 12 '19 at 05:22
-
1ActiveXObject only exists in Internet Explorer and only for Trusted sites. See https://stackoverflow.com/questions/7022568/activexobject-in-firefox-or-chrome-not-ie . It is a major security hole. I would never let any website arbitrarily run code on my computer. – Jun 12 '19 at 05:24
-
Then in that case we can used Firebreath, right?? Link from the answer: http://www.firebreath.org/ – iamrajshah Jun 12 '19 at 05:26
-
0
In general, no, because that would be a huge security hole and lead to the spread of viruses and malware.
In certain specific cases where you can control the user's computer already, you may be able to do it (e.g. Internet Explorer with trusted sites as Strom said).
But it's not really worth pursuing such options as they are being aggresively shut down by browser vendors all the time.

O'Rooney
- 2,878
- 2
- 27
- 41