Hello. I've written a page for an intranet that gives the user the
option of launching a Word or PowerPoint document.
The code I used to force the hyperlink to launch the application
rather than open the file in a browser is:
<script language="JavaS cript">
function startPowerPoint (strFile)
{
var myApp = new ActiveXObject(" PowerPoint.Appl ication");
if (myApp != null)
{
myApp.Visible = true;
myApp.Presentat ions.Open(strFi le);
}
}
</script>
Then the link is:
javascript:star tPowerPoint('ht tp://servername/PowerPoint_file s/template.PPT')
This works perfectly if PowerPoint is not running. However, if
PowerPoint is already open, it launches subsequent files underneath
the intranet page.
Is there a way to modify the script so that, whenever it launches a
PowerPoint document, it switches focus to that document?
Thanks,
David
option of launching a Word or PowerPoint document.
The code I used to force the hyperlink to launch the application
rather than open the file in a browser is:
<script language="JavaS cript">
function startPowerPoint (strFile)
{
var myApp = new ActiveXObject(" PowerPoint.Appl ication");
if (myApp != null)
{
myApp.Visible = true;
myApp.Presentat ions.Open(strFi le);
}
}
</script>
Then the link is:
javascript:star tPowerPoint('ht tp://servername/PowerPoint_file s/template.PPT')
This works perfectly if PowerPoint is not running. However, if
PowerPoint is already open, it launches subsequent files underneath
the intranet page.
Is there a way to modify the script so that, whenever it launches a
PowerPoint document, it switches focus to that document?
Thanks,
David
Comment