Exportieren (0) Drucken
Alle erweitern
AddCallout Method
AddCanvas Method
AddConnector Method
AddCurve Method
AddDiagram Method
AddLabel Method
AddLine Method
AddOLEControl Method
AddOLEObject Method
AddPicture Method
AddPolyline Method
AddShape Method
AddTextbox Method
AddTextEffect Method
BuildFreeform Method
GetEnumerator Method
Range Method
SelectAll Method
Erweitern Minimieren

Shapes.AddOLEObject Method

Creates an OLE object. Returns the Shape object that represents the new OLE object.

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

'Usage
Dim ClassType As Object
Dim FileName As Object
Dim LinkToFile As Object
Dim DisplayAsIcon As Object
Dim IconFileName As Object
Dim IconIndex As Object
Dim IconLabel 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.AddOLEObject(ClassType, FileName, LinkToFile, DisplayAsIcon, IconFileName, IconIndex, IconLabel, Left, Top, Width, Height, Anchor)

Shape AddOLEObject(
	[In, Optional] ref object ClassType, 
	[In, Optional] ref object FileName, 
	[In, Optional] ref object LinkToFile, 
	[In, Optional] ref object DisplayAsIcon, 
	[In, Optional] ref object IconFileName, 
	[In, Optional] ref object IconIndex, 
	[In, Optional] ref object IconLabel, 
	[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 AddOLEObject(
	/*in*/System.Object ClassType, 
	/*in*/System.Object FileName, 
	/*in*/System.Object LinkToFile, 
	/*in*/System.Object DisplayAsIcon, 
	/*in*/System.Object IconFileName, 
	/*in*/System.Object IconIndex, 
	/*in*/System.Object IconLabel, 
	/*in*/System.Object Left, 
	/*in*/System.Object Top, 
	/*in*/System.Object Width, 
	/*in*/System.Object Height, 
	/*in*/System.Object Anchor
);
function AddOLEObject(
	 ClassType : Object, 
	 FileName : Object, 
	 LinkToFile : Object, 
	 DisplayAsIcon : Object, 
	 IconFileName : Object, 
	 IconIndex : Object, 
	 IconLabel : Object, 
	 Left : Object, 
	 Top : Object, 
	 Width : Object, 
	 Height : Object, 
	 Anchor : Object
) : Shape;

Parameters

ClassType

Optional Object. The name of the application used to activate the specified OLE object.

FileName

Optional Object. The file from which the object is to be created. If this argument is omitted, the current folder is used. You must specify either the ClassType or FileName argument for the object, but not both.

LinkToFile

Optional Object. True to link the OLE object to the file from which it was created. False to make the OLE object an independent copy of the file. If you specified a value for ClassType, the LinkToFile argument must be False. The default value is False.

DisplayAsIcon

Optional Object. True to display the OLE object as an icon. The default value is False.

IconFileName

Optional Object. The file that contains the icon to be displayed.

IconIndex

Optional Object. The index number of the icon within IconFileName. The order of icons in the specified file corresponds to the order in which the icons appear in the Change Icon dialog box (Insert menu, Object dialog box) when the Display as icon check box is selected. The first icon in the file has the index number 0 (zero). If an icon with the given index number doesn't exist in IconFileName, the icon with the index number 1 (the second icon in the file) is used. The default value is 0 (zero).

IconLabel

Optional Object. A label (caption) to be displayed beneath the icon.

Left

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

Top

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

Width

Optional Object. The width of the OLE object, in points.

Height

Optional Object. The height of the OLE object, in points.

Anchor

Optional Object. The range to which the OLE object is bound. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph of the anchoring range. If Anchor is not specified, the anchor is placed automatically and the OLE Object 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

Anzeigen:
© 2015 Microsoft