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

expression.expression. ConvertToInlineShape

_表达式_是必需的。expression Required. 一个代表 "Shape" 对象的变量。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

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.