InlineShapes.AddOLEControl procedure builder

InlineShapes.AddOLEControl (Word)

Creates an ActiveX control (formerly known as an OLE control). Returns the InlineShape object that represents the new ActiveX control.

ActiveX controls are represented as either Shape objects or InlineShape objects in Microsoft Word. To modify the properties for an ActiveX control, you use the Object property of the OLEFormat object for the specified shape or inline shape. For information about available ActiveX control class types, see OLE Programmatic Identifiers.

AddOLEControl (ClassType, Range)

Dim iseAddOLEControl As InlineShape
Set iseAddOLEControl = ActiveDocument.Range.InlineShapes.AddOLEControl()

Arguments

Optional arguments

The following arguments are optional

ClassType - The programmatic identifier for the ActiveX control to be created

Range - The range where the ActiveX control will be placed in the text. The ActiveX control replaces the range, if the range isn't collapsed. If this argument is omitted, the Active X control is placed automatically