Open a Word file using java script

Here is the java script code for opening and saving the content of a MS Word file..


u need to take a object and in that u can assign the Activez object of a WORD APPLICATION.....




var word=new ActiveXObject('Word.Application');
var Text;
var obj;
if (word != null)
{
word.Visible = true;
obj=word.Documents.Open("D:\\test.doc");
Text = obj.Content;
word.Selection.TypeText("Testing Word");
word.Documents.Save();
document.write(Text);
}




Thanks


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: