Executes a verb on the specified object.
Syntax
Object.DoVerb[(Verb)]
Arguments
Verb
The verb to execute on the object within the OLE container control. If not specified, the default verb is executed. The value of this argument can be one of the standard verbs supported by all objects or an index of the ObjectVerbs property array. Each object can support its own set of verbs.
The following values represent standard verbs supported by every object:
Value | Action |
0 | The default action for the object. |
–1 | Activates the object for editing. If the application that created the object supports in-place activation, the object is activated within the OLE container control. |
–2 | Opens the object in a separate application window. If the application that created the object supports in-place activation, the object is activated in its own window. |
–3 | For embedded objects, hides the application that created the object. |
–4 | If the object supports in-place activation, activates the object for in-place activation and shows any user interface tools. If the object doesn't support in-place activation, the object doesn't activate, and an error occurs. |
–5 | If the user moves the focus to the OLE container control, creates a window for the object and prepares the object to be edited. An error occurs if the object doesn't support activation on a single mouse click. |
–6 | Used when the object is activated for editing to discard all record of changes that the object's application can undo. |
Remarks
If you set the AutoActivate property to 2 (DoubleClick), the OLE container control automatically activates the current object when the user double-clicks the control.
Tip Although you can use the name of the verb (edit, open, play, and so on) to specify the verb to use with DoVerb, it is much faster to use the index (0, 1, 2, and so on).