Diese Dokumentation wurde archiviert und wird nicht länger gepflegt.

Shapes.AddOLEControl Method

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

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Dim ClassType As Object
Dim Left As Object
Dim Top As Object
Dim Width As Object
Dim Height As Object
Dim Anchor As Object
Dim returnValue As Shape
Dim shapes1 As Shapes
returnValue = shapes1.AddOLEControl(ClassType, Left, Top, Width, Height, Anchor)

Shape AddOLEControl(
	[In, Optional] ref object ClassType, 
	[In, Optional] ref object Left, 
	[In, Optional] ref object Top, 
	[In, Optional] ref object Width, 
	[In, Optional] ref object Height, 
	[In, Optional] ref object Anchor
public Shape AddOLEControl(
	/*in*/System.Object ClassType, 
	/*in*/System.Object Left, 
	/*in*/System.Object Top, 
	/*in*/System.Object Width, 
	/*in*/System.Object Height, 
	/*in*/System.Object Anchor
function AddOLEControl(
	 ClassType : Object, 
	 Left : Object, 
	 Top : Object, 
	 Width : Object, 
	 Height : Object, 
	 Anchor : Object
) : Shape;



Optional Object. The programmatic identifier for the ActiveX control to be created.


Optional Object. The position (in points) of the left edge of the new object relative to the anchor.


Optional Object. The position (in points) of the upper edge of the new object relative to the anchor.


Optional Object. The width of the ActiveX control, in points.


Optional Object.The height of the ActiveX control, in points.


Optional Object. The range to which the ActiveX control is bound. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. If this argument is omitted, however, the anchor is placed automatically and the ActiveX control is positioned relative to the top and left edges of the page.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms