D
David
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="JavaScript">
function startPowerPoint(strFile)
{
var myApp = new ActiveXObject("PowerPoint.Application");
if (myApp != null)
{
myApp.Visible = true;
myApp.Presentations.Open(strFile);
}
}
</script>
Then the link is:
javascript:startPowerPoint('http://servername/PowerPoint_files/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="JavaScript">
function startPowerPoint(strFile)
{
var myApp = new ActiveXObject("PowerPoint.Application");
if (myApp != null)
{
myApp.Visible = true;
myApp.Presentations.Open(strFile);
}
}
</script>
Then the link is:
javascript:startPowerPoint('http://servername/PowerPoint_files/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