편집

다음을 통해 공유


OLEFormat Interface

Definition

Represents the OLE characteristics (other than linking) for an OLE object, ActiveX control, or field.

public interface class OLEFormat
[System.Runtime.InteropServices.Guid("00020933-0000-0000-C000-000000000046")]
public interface OLEFormat
type OLEFormat = interface
Public Interface OLEFormat
Attributes

Remarks

Use the OLEFormat property for a Shape, InlineShape, or Field object to return the OLEFormat object.

Not all types of shapes, inline shapes, and fields have OLE capabilities. Use the Type property for the Shape and InlineShape objects to determine what category the specified shape or inline shape falls into. The Type property for a Field object returns the type of field.

You can use the Activate(), Edit(), Open(), and DoVerb(Object) methods to automate an OLE object.

Use the Object property to return an object that represents an ActiveX control or OLE object. With this object, you can use the properties and methods of the container application or the ActiveX control.

Properties

Application

Returns a Application object that represents the Microsoft Word application.

ClassType

Returns or sets the class type for the specified OLE object, picture, or field.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

DisplayAsIcon

True if the specified object is displayed as an icon.

IconIndex

Returns or sets the icon that's used when the DisplayAsIcon property is True: 0 (zero) corresponds to the first icon, 1 corresponds to the second icon, and so on. If this argument is omitted, the first (default) icon is used.

IconLabel

Returns or sets the text displayed below the icon for an OLE object.

IconName

Returns or sets the program file in which the icon for an OLE object is stored.

IconPath

Returns the path of the file in which the icon for an OLE object is stored.

Label

Returns a string that's used to identify the portion of the source file that's being linked. For example, if the source file is a Microsoft Excel workbook, the Label property might return "Workbook1!R3C1:R4C2" if the OLE object contains only a few cells from the worksheet.

Object

Returns an Object that represents the specified OLE object's top-level interface. This property allows you to access the properties and methods of an ActiveX control or the application in which an OLE object was created. The OLE object must support OLE Automation for this property to work.

Parent

Returns an object that represents the parent object of the specified object.

PreserveFormattingOnUpdate

True preserves formatting done in Microsoft Word to a linked OLE object, such as a table linked to a Microsoft Excel spreadsheet.

ProgID

Returns the programmatic identifier (ProgID) for the specified OLE object.

Methods

Activate()

Activates the specified object.

ActivateAs(String)

Sets the Windows registry value that determines the default application used to activate the specified OLE object.

ConvertTo(Object, Object, Object, Object, Object)

Converts the specified OLE object from one class to another, making it possible for you to edit the object in a different server application, or change how the object is displayed in the document.

DoVerb(Object)

Requests that an OLE object perform one of its available verbs— the actions an OLE object takes to activate its contents. Each OLE object supports a set of verbs that pertain to that object.

Edit()

Opens the specified OLE object for editing in the application it was created in.

Open()

Opens the specified object.

Applies to