Availability: |
| ||
Property/method value type: | WScript object | ||
JavaScript syntax: | WSH | WScript.GetObject(aPath) | |
WSH | WScript.GetObject(aPath, aProgID) | ||
WSH | WScript.GetObject(aPath, aProgID, aPrefix) | ||
Argument list: | aPath | The path to an already existing document | |
aProgID | An application programme ID | ||
aPrefix | A hook into the event model |
You can use this method to access an object that you know already exists without needing to create a fresh instance. An example of the difference is that CreateObject() is used to manufacture new documents via the application while GetObject() is used to access existing documents.
Given the object that encapsulates the document, since it is a WScript object, you can access its Application property to control the owning application.
See also: | WScript.Application |
Prev | Home | Next |
WScript.FullName | Up | WScript.Name |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |