Availability: |
| |||
Property/method value type: | Automation object | |||
JavaScript syntax: | IE | GetObject(aLocation) | ||
IE | GetObject(aLocation, anObjectType) | |||
IE | GetObject(aLocation!aSubObject) | |||
IE | GetObject(aLocation!aSubObject, anObjectType) | |||
Argument list: | anObjectType | What sort of application and object class type to be created | ||
aLocation | A path to the file for the object to be instantiated | |||
aSubObject | A fragment identifier for a sub-object within the file |
When this function is called, the application may be activated to provide a remote interface to the file. You can also specify fragments within the file.
The path argument points at the file within the file system where the object you want reposes.
This is related to the ActiveXObject() constructor which creates an object that points at an application or document without loading a file to instantiate it.
The objects created by this function are called Automation objects.
The location value can have a fragment identifier delimited by an exclamation mark. With this for example, you can refer to one worksheet within an excel document.
// Locate an Excel spreadsheet myWorkbook = GetObject("F:\\DOCUMENTS\\ACCOUNTS.XLS"); // Locate one worksheet within an Excel spreadsheet myWorkSheet = GetObject("F:\\DOCUMENTS\\ACCOUNTS.XLS!sheet4");
See also: | ActiveXObject() |
Prev | Home | Next |
getClass() | Up | GetPropertyName() |
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. |