InlineShapes.AddOLEControl(Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an ActiveX control (formerly known as an OLE control).
public Microsoft.Office.Interop.Word.InlineShape AddOLEControl (ref object ClassType, ref object Range);
abstract member AddOLEControl : obj * obj -> Microsoft.Office.Interop.Word.InlineShape
Public Function AddOLEControl (Optional ByRef ClassType As Object, Optional ByRef Range As Object) As InlineShape
Parameters
- ClassType
- Object
Optional Object. The programmatic identifier for the ActiveX control to be created.
- Range
- Object
Optional Object. 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.
Returns
Remarks
This method 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, use the Object property of the OLEFormat object for the specified shape or inline shape.