Edit Method

Microsoft Word Visual Basic

Edit Method

       

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

expression.Edit

expression   Required. An expression that returns an OLEFormat object.

Example

This example opens (for editing) the first embedded OLE object (defined as a shape) on the active document.

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

This example opens (for editing) the first linked OLE object (defined as an inline shape) in the active document.

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