COM references

A COM reference is also known as a “typed” reference, because it can refer only to a COM object of a specified type. When you create a COM reference, you must specify the class of the item that the reference will refer to. For example, you could create a COM reference that refers to an Excel workbook. The type library for an application specifies the types of objects a COM reference can refer to in that application.

Because a COM reference contains type information, checking can be done at compile-time to verify that the reference always refers to an object of the specified type. If a COM reference refers to an object that isn’t the appropriate type, a compiler error will result.

Using COM references can also improve the performance of your COM integration. Because COM type information is contained in the reference, the script compiler can use “early binding”. This means all of the necessary information to connect to the specified object must be retrieved only once, when the script is compiled.


Documentation Feedback