ObjectVerbs Collection

Microsoft Publisher Visual Basic

ObjectVerbs Collection

OLEFormat ObjectVerbs

Represents the collection of OLE verbs for the specified OLE object. OLE verbs are the operations supported by an OLE object. Commonly used OLE verbs are play and edit.

Using the ObjectVerbs object

Use the ObjectVerbs property to return an ObjectVerbs object. The following example displays all the available verbs for the OLE object contained in the first shape on first page in the active publication. For this example to work, the specified shape must contain an OLE object.

Sub GetVerbs()
    Dim intCount As Integer

    With ActiveDocument.Pages(1).Shapes(1).OLEFormat
        For intCount = 1 To .ObjectVerbs.Count
            MsgBox .ObjectVerbs(intCount)
        Next
    End With
End Sub