## The `oledoctypes' property

Read-only, 4-column nested matrix of character vectors

Valid for: System object

The `oledoctypes` property of the System object returns a nested matrix which gives details of the OLE document types available on your system. These are classes of document which can be placed in an `OLEContainer` object and thus activated in one of your windows. (The same information is also shown in the Control Browser on the Tools menu).

The returned array has one row for each OLE document type available. However, not all of these will necessarily be usable from APLX, since they may be private document types which are not designed for use by other applications.

The first column is the plain text name, for example `'Microsoft Document'`. The second column is an alphanumeric string enclosed in curly brackets, which is the unique ID of the OCX control. The third column is the programmatic class name, which is usually a period-delimited string giving the vendor name, object class name and optionally the version number, for example `'Word.Document'`. (The fourth column is reserved for future use).

The third of these is the name which corresponds to the `progid` property of the OLEContainer object, which can be used to create an empty document of a particular type.

Under MacOS and Linux, the `oledoctypes` property always returns an empty matrix because OLE is not implemented.

### Example

Retrieve the list of OLE document types installed on the system:

          OLE„'#' ŚWI 'oledoctypes'
          ˝OLE
    25 4

In this case there are a total of 25 types of OLE document known to the system.

On most Windows systems, one of the valid OLE document types is a Bitmap Image, editable using Microsoft Paint. If it is available on the system, it should appear in the list of classes returned by the `oledoctypes` property:

          OLE[;1]Ľ›'Bitmap Image'
    24
          OLE[24;]
     Bitmap Image {D3E34B21-9D75-101A-8C3D-00AA001A1652} Paint.Picture

We can use this information to create a new bitmap image in an OLE container inside an APLX window:

          MYWIN„'Ś' ŚNEW 'Window'
          MYWIN.OLE.New 'OLEContainer' Ş MYWIN.OLE.align„Ż1
          MYWIN.OLE.progid„'Paint.Picture'

Topic: APLX Help : System Classes : Properties : oledoctypes

[ Previous | Next | Contents | Index ]