If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > MS Applications calling using javascripts

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-08-07, 09:34
sajithpdot sajithpdot is offline
Registered User
 
Join Date: Oct 2007
Posts: 1
MS Applications calling using javascripts

Hi All
I am using javascript for calling MS applications using activexobject. Below giving the codes

<script language="JScript">
function openWord()
{

var objShell = new ActiveXObject("WScript.Shell");
var objWord = new ActiveXObject("Word.Application");
var objDoc = objWord.Documents.Add();
objWord.Visible = true;
objShell.AppActivate("Document1");

}

}

function openExcel()
{

var myApp = new ActiveXObject("Excel.Application");
if (myApp != null)
{
myApp.visible = true;
var Book = myApp.Workbooks.Add();
myApp.workbooks.open("Book1.xls");

}
}

function openPPT()
{

var myApp = new ActiveXObject("PowerPoint.Application");
if (myApp != null)
{
myApp.Visible = true;
myApp.Presentations.Add();
myApp.Presentations.Open("Presentation1.ppt");
}


}

function openOutlook()
{
var ws = new ActiveXObject("WScript.Shell");
ws****n("outlook");
}
</script>

I want to call other applications like openoffice.org writer (Sun's office application), ms paint, notepad etc...
If anybody know its codes please send me and will be appreciated
[email address removed - this is a public forum!]


thanks and regards
Sajith P

Last edited by gvee; 10-08-07 at 10:24.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On