MATLAB Function Reference    
actxserver

Create a COM Automation server and return a COM object for the server's default interface

Syntax

Arguments

progid
   This is a string that is the name of the control to instantiate. This string is provided by the control or server vendor and should be obtained from the vendor's documentation. For example, the progid for MATLAB is matlab.application.

machinename
   This is the name of a remote machine on which the server is to be run. This argument is optional and is used only in environments that support Distributed Component Object Model (DCOM) -- see Using MATLAB As a DCOM Server Client in the External Interfaces documentation. This can be an IP address or a DNS name.

Description

Create a COM Automation server and return a COM object that represents the server's default interface. Local/Remote servers differ from controls in that they are run in a separate address space (and possibly on a separate machine) and are not part of the MATLAB process. Additionally, any user interface that they display will be in a separate window and will not be attached to the MATLAB process. Examples of local servers are Microsoft Excel and Microsoft Word. There is currently no support for events generated from automation servers.

Examples

Launch Microsoft Excel and make the main frame window visible:

Call the get method on the excel object to list all properties of the application:

Create an interface:

List all methods for that interface by calling invoke with just the handle argument:

Invoke the Add method on workbooks to add a new workbook, also creating a new interface:

Quit the application and delete the object:

See Also

actxcontrol, release, delete, save, load


  actxcontrol addframe