Shapes.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, Left, Top, Width, Height, Anchor)


Dim shpAddOLEControl As Shape
Set shpAddOLEControl = Selection.HeaderFooter.Shapes.AddOLEControl()

Arguments

Optional arguments

The following arguments are optional

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

Left - Long

Top - Long

Width - Long

Height - Long

Anchor - Range