Shape.ConvertToInlineShape 方法 (Word)Shape.ConvertToInlineShape method (Word)

将文档绘图层的指定图形转换为文字层的嵌入式图形。Converts the specified shape in the drawing layer of a document to an inline shape in the text layer. 只能转换代表图片、OLE 对象或 ActiveX 控件的图形。You can convert only shapes that represent pictures, OLE objects, or ActiveX controls. 此方法返回一个**InlineShape** 对象,该对象代表图片或 OLE 对象。This method returns an InlineShape object that represents the picture or OLE object.

语法Syntax

expressionexpression. ConvertToInlineShape

expression:必需。expression Required. 代表形状对象的变量。A variable that represents a 'Shape' object.

注解Remarks

支持附加的文字的图形不能转换为嵌入式图形。Shapes that support attached text cannot be converted to inline shapes. 对于这些形状,使用ConvertToFrame方法。For these shapes, use the ConvertToFrame method.

如果包含多个形状的ShapeRange对象使用此方法,将发生错误。If you use this method on a ShapeRange object that contains more than one shape, an error occurs.

示例Example

本示例将 MyDoc.doc 中的每张图片转换为内嵌形状。This example converts each picture in MyDoc.doc to an inline shape.

For Each s In Documents("MyDoc.doc").Shapes 
 If s.Type = msoPicture Then 
 s.ConvertToInlineShape 
 End If 
Next s

另请参阅See also

形状对象Shape Object