The COM_CreateObject() function creates a COM object reference to a new instance of an object.


COM_CreateObject(object_type {, servername})


object_type – A string containing the fully-qualified class name of the object to be created.

servername – An optional string, specifying the machine where the object is to be created.

Return value

A COM object reference of the type specified with the object_type parameter. If the object cannot be created, the value null is returned.


Typically, creating an application object will produce an application that is not visible. If you want the application to be visible, you will need to set the appropriate property of the application object.

Documentation Feedback