OLEFormat.DoVerb Method
Requests that an OLE object perform one of its verbs.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Sub DoVerb ( _
Index As Integer _
)
'Usage
Dim instance As OLEFormat
Dim Index As Integer
instance.DoVerb(Index)
void DoVerb(
int Index
)
Parameters
- Index
Type: System.Int32
The verb to perform. If this argument is omitted, the default verb is performed.
Remarks
Use the _Index(Int32) property to determine the available verbs for an OLE object.
Examples
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.DoVerbEnd 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.DoVerbnCount
Exit For
End If
Next
End If
End With