OLEFormat Object

Word Developer Reference

Represents the OLE characteristics (other than linking) for an OLE object, ActiveX control, or field.

Remarks

Use the OLEFormat property for a shape, inline shape, or field to return the OLEFormat object. The following example displays the class type for the first shape on the active document.

Visual Basic for Applications
  MsgBox ActiveDocument.Shapes(1).OLEFormat.ClassType

Not all types of shapes, inline shapes, and fields have OLE capabilities. Use the Type property for the Shape and InlineShape objects to determine what category the specified shape or inline shape falls into. The Type property for a Field object returns the type of field.

You can use the Activate, Edit, Open, and DoVerb methods to automate an OLE object.

Use the Object property to return an object that represents an ActiveX control or OLE object. With this object, you can use the properties and methods of the container application or the ActiveX control.

See Also