Send Event

Microsoft Outlook Visual Basic

Show All

Send Event

       

Occurs when the user selects the Send action for a Microsoft Outlook item.

Sub object_Send(Cancel As Boolean)

object   An expression that evaluates to one of the objects in the Applies To list. In VBScript, use the word Item.

Cancel   Optional (not used in VBScript). False when the event occurs. If the event procedure sets this argument to True, the send operation is not completed and the inspector is left open.

Remarks

In VBScript, if you set the return value of this function to False, the item is not sent.

Example

This VBScript example uses the Send event and sends an item with an automatic expiration date of one week.

Function Item_Send()
    Item.ExpiryTime = Date + 7
End Function