access word doc from javascript? -


I have tried to load the .doc file in the HTML page using an object tag. And this word does not show to the toolbar. I need to allow the user to print the document in print from the print option.

What is the possible way in JavaScript to enable the word toolbar ??

And I have tried the second approach using ActiveXObject .. But this method opens the document in winword.exe .. Is there a way to embed .doc file through Javascript? ?

Edit:
I was looking for other possibilities, but nothing works

  1. Someone Have an idea about the list of parameters available for Word AccessX?
    Enable toolbar on assets load in it.

  2. I used the code below to load. Doc content for ActiveX Word document control

      var objWord = new ActiveXObject ("Word.Application"); ObjWord.Visible = false; Var Doctor = New ActiveXObject ("Word.Document"); Doctor = objWord.Documents.Add ("c: \\ test.doc", true);  

    What is the DOC element presented in HTML directly ... like putting this element in an iframe or whatever ??

  3. I was specifying property of iframe source directly in the doc file, like

    This loads the doctor in the browser, but this prompt is to open a downloader window.

I In fact, any indication I would like to take me in some direction.

  & lt ; HTML & gt; & lt; HEAD & gt; & gt; TITLE & gt; MSWORD app via Javascript & lt; / TITLE & gt; & lt; / HEAD & gt; & lt; body & gt; & Lt; script & gt; var w = new ActiveXObject ('Word.Application'); var docText; Var obj; if (w! = Null) {w.Visible = true; // you can appear here or not Obj = w.Documents.Open ("C: \\ A.doc"); DocText = obj.Content; w.Selection.TypeText ("Hello"); w.Documents.Save (); Document.write (docText) ; // Print the webpage * The above code opens the current document set w = visible = false * / / * The code below will create the doctor file and add data to it and close * / w.Documents added (); W.Selection.TypeText ("Writing this message ...."); W.Documents.Save ("C: \\ doc_From_javaScript.doc"); W.Quit (); / * Do not forget to set w = visible = false * /}  

Comments