Contents Previous Next Subchapters

Creating a Connection to a COM/Automation Server
Syntax cocreate(server program ID)
See Also cowith

Creates a connection to the COM automation server that is identified with the character row vector server program ID. If no argument is specified the cocreate function returns a character row vector that identifies the currently connected server.

O-Matrix may be connected to no more than one server at a time. If cocreate is called while a server is connected the current connection is released before the new request is established. Calling the O-Matrix clear command will terminate all server connections.

If at the command prompt you enter
O-Matrix will initialize the Windows OLE/COM services and create a connection to the Excel Application object. If you continue the example above by entering
O-Matrix will respond
If you continue the example by entering
O-Matrix will respond