CustomAction Event

CustomAction Event

See Also         Example         Applies To

Occurs when a custom action of an Outlook item executes. The Action object and the newly-created item resulting from the custom action are passed to the event.

Syntax 1

Function Item_CustomAction()

Syntax 2

Sub object_CustomAction(Cancel as Boolean)

object   An expression that evaluates to an object in the “Applies To” list.

Cancel   Optional. False when the event occurs. If the event procedure sets this argument to True, the custom action is not completed.

Remarks

Use Syntax 1 in VBScript. If you set the return value of this function to False, the custom action operation is not completed.

Use Syntax 2 when handling the CustomAction event in Visual Basic or Visual Basic for Applications.