다음을 통해 공유


OLEFormat.ConvertTo Method

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.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Sub ConvertTo ( _
    ByRef ClassType As Object, _
    ByRef DisplayAsIcon As Object, _
    ByRef IconFileName As Object, _
    ByRef IconIndex As Object, _
    ByRef IconLabel As Object _
)
'Usage
Dim instance As OLEFormat
Dim ClassType As Object
Dim DisplayAsIcon As Object
Dim IconFileName As Object
Dim IconIndex As Object
Dim IconLabel As Object

instance.ConvertTo(ClassType, DisplayAsIcon, _
    IconFileName, IconIndex, IconLabel)
void ConvertTo(
    ref Object ClassType,
    ref Object DisplayAsIcon,
    ref Object IconFileName,
    ref Object IconIndex,
    ref Object IconLabel
)

Parameters

  • ClassType
    Type: System.Object%
    Optional Object. The name of the application used to activate the OLE object. You can see a list of the available applications in the Object type box on the Create New tab in the Object dialog box (Insert menu). You can find the ClassType string by inserting an object as an inline shape and then viewing the field codes. The class type of the object follows either the word "EMBED" or the word "LINK."
  • DisplayAsIcon
    Type: System.Object%
    Optional Object. True to display the OLE object as an icon. The default value is False.
  • IconFileName
    Type: System.Object%
    Optional Object. The file that contains the icon to be displayed.
  • IconIndex
    Type: System.Object%
    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
    Type: System.Object%
    Optional Object. A label (caption) to be displayed beneath the icon.

See Also

Reference

OLEFormat Interface

OLEFormat Members

Microsoft.Office.Interop.Word Namespace