OLE Automation is a standard, promoted by Microsoft, that applications use to expose their OLE objects to development tools, BlueZone Basic, and containers that support OLE Automation. A spreadsheet application can expose a worksheet, chart, cell, or range of cells all as different types of objects. A word processor can expose objects such as application, paragraph, sentence, bookmark, or selection.
Sub Main Dim MyObj As Object Set MyObj = CreateObject ("Word.Basic") MyObj.FileNewDefault MyObj.Insert "Hello, world." MyObj.Bold 1 End Sub
Set MyObj = GetObject ("", class)
Where class is the parameter representing the class of the object to retrieve. The first parameter at this time must be an empty string.
The properties and methods an object supports are defined by the application that created the object. See the application's documentation for details on the properties and methods it supports.
Name | Description |
---|---|
CreateObject | Function Creates a new object of a specified type. |
GetObject | Function Retrieves an object pointer to a running application. |