OLEFormat.DoVerb method (PowerPoint)

Requests that an OLE object perform one of its verbs.

Syntax

expression. DoVerb (Index)

expression A variable that represents an OLEFormat object.

Parameters

Name Required/Optional Data type Description
Index Optional Integer The verb to perform. If this argument is omitted, the default verb is performed.

Remarks

Use the ObjectVerbs property to determine the available verbs for an OLE object.

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 "Open."

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

See also

OLEFormat Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.