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 1 5841
David wrote: 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?
We rarely have people scripting PowerPoint here, if you have PowerPoint
then you should look into its documentation, it should document the
object model, the documentation is geared towards VBA but of course the
object model and the property and method names are the same when you use
JScript to script PowerPoint. Look up whether the PowerPoint.Appl ication
object has a propery or method to bring it to the front. Looking into
the object model here I guess that
myApp.Activate( );
brings the application window to the front but I haven't tested that.
I am sure people in a powerpoint group know more about that.
--
Martin Honnen http://JavaScript.FAQTs.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brad Jones |
last post by:
Hello, I'm hoping someone can give me some help or guidance here. I'm not
sure if this is even the best group to post to for this.
Our OEM equipment's software architecture relies heavily on a "master"
windows service. This responsibility of this service is to launch 10 or so
other applications, some of which have GUI's. These applications need to be
running whether somebody is logged in or not. There is no communication
required between...
|
by: sebastien |
last post by:
Hi
I have an asp.net application that use Session variables.
What I want to do is to launch an second instance of this application
by a link inside the first application.
The problem is: when I launch the second application, this second
application override the session variables values of the first
application.
I can run 2 instances of my asp.net application if I open two browsers
and I enter the url of my web application in the address...
|
by: John A. Bailo |
last post by:
Excuse the novice aspects of this question, but:
What techniques are available to me for launching one c# application (
console .exe) from another?
For example, I know there is the Process and ProcessInfo classes, but
these seem designed for launching non-CLR applications.
Should I access the .exe as a reference?
|
by: ChrisBowringGG |
last post by:
Hi,
I am trying to get information about 16-bit applications using
Process.GetProcesses and variants, but none of the 16-bit
applications show up with these methods.
I tried to get at them by looking at the properties of the
ntvdm process (see
http://www.microsoft.com/mspress/india/Pages/WinXP_tips_Insideout_101801_786.htm),
but to no avail.
|
by: Mark |
last post by:
I've searched a bunch of groups, and they say this can be done, but for
some reason, I can't get it to work.
Here's my ASP page:
<% @ Language=VBScript %>
<Script language=javascript>
function cont(strTitle){
if("undefined"!=typeof strTitle){
window.opener.location='somepage.asp?title=' + strTitle;
| |
by: Marcin Wiszowaty |
last post by:
Hello,
I work at a company that has 2 development enviroments. One Unix which i
dont know anything about and the othe vs.net 03 with MSSQL server 2000 for
db. How can i cause applications (scripts) to get run in unix while using
preferably vb.net or c# applications run in windows. So far all the unix
aplications are started manualy through the command window. Files are sent
using FTP. We have XceedFTP client to send files to unix from...
|
by: Oriane |
last post by:
Hi there,
I would like to run a javascript file directly from the desktop, like a
VBScript file. So my post is perhaps "out of topic" in which case I
apologize.
The goal is to run this sort of script, which in turn will open an HTML page
inside a Windows window:
"window.open (http://www..., arg...)"
|
by: =?Utf-8?B?TWFyayBIb2xsYW5kZXI=?= |
last post by:
Hi All,
I am trying to launch an application based on the extension just like
windows explorer does, specifically with regards to templates.
For example,
1. When you double click on a word template, it loads word with a new
document based on the template you clicked on. Extension: dot
2. When you double click on a excel template, it loads a new spread sheet
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |