DoVerb Method

Applies To

OLEFormat object.

Description

Requests that an OLE object perform one of its verbs. Use the ObjectVerbs property to determine the available verbs for an OLE object.

Syntax

expression.DoVerb(Index)

expression Required. An expression that returns an OLEFormat object.

Index Optional Integer. The verb to perform. If this argument is omitted, the default verb is performed.

Example

This example performs the default verb for shape three on slide one in the active presentation if shape three is a linked or embedded OLE object.

With ActivePresentation.Slides(1).Shapes(3)
    If .Type = msoEmbeddedOLEObject Or _
            .Type = msoLinkedOLEObject Then
        .OLEFormat.DoVerb
    End If
End With
This example performs the verb "Open" for shape three on slide one in the active presentation if shape three is an OLE object that supports the verb "Play."

With ActivePresentation.Slides(1).Shapes(3)
    If .Type = msoEmbeddedOLEObject Or _
            .Type = msoLinkedOLEObject Then
        For Each sVerb In .OLEFormat.ObjectVerbs
            nCount = nCount + 1
            If sVerb = "Open" Then
                .OLEFormat.DoVerb nCount
                Exit For
            End If
        Next
    End If
End With