OLEFormat.Edit 方法 (Word)

在创建指定 OLE 对象的应用程序中打开该对象,以便进行编辑。

语法

表达式编辑

expression 是必需的。 一个代表“OLEFormat”对象的变量。

示例

本示例打开(为了进行编辑)活动文档中第一个嵌入式 OLE 对象(定义为图形)。

Dim shapesAll As Shapes 
 
Set shapesAll = ActiveDocument.Shapes 
If shapesAll.Count >= 1 Then 
 If shapesAll(1).Type = msoEmbeddedOLEObject Then 
 shapesAll(1).OLEFormat.Edit 
 End If 
End If

本示例打开(为了进行编辑)活动文档中第一个链接的 OLE 对象(定义为嵌入式图形)。

Dim colIS As InlineShapes 
 
Set colIS = ActiveDocument.InlineShapes 
If colIS.Count >= 1 Then 
 If colIS(1).Type = wdInlineShapeLinkedOLEObject Then 
 colIS(1).OLEFormat.Edit 
 End If 
End If

另请参阅

OLEFormat 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。