COM

Description

CreateObject lets you create and use Component Object Model (COM) objects. An automation server object type that is currently registered on a computer can be invoked. You can use a utility like Microsoft's OLEView utility to browse COM objects. OLEView, and information about COM and DCOM, can be found at Microsoft's OLE Development web site http://www.microsoft.com/oledev/.

To create COM objects, you must provide the program ID or filename of the object, the methods and properties available through the IDispatch interface, and the arguments and return types of the object's methods. The OLEView utility can give you this information for most COM objects.

Category

Other functions

Syntax

CreateObject("COM", class, context, serverName)  

Parameters

Parameter
Description
class
Required. Enter the component ProgID for the object to invoke
context
Optional. "InProc", "Local", or "Remote". Uses registry setting when not specified
serverName
Required when CONTEXT = "Remote". Enter a valid server name using UNC (Universal Naming Convention) or DNS (Domain Name Server) conventions, in one of the following forms:
SERVER = "\\lanserver" 
SERVER = "lanserver" 
SERVER = "http://www.servername.com" 
SERVER = "www.servername.com" 
SERVER = "127.0.0.1"