Forward Event

Microsoft Outlook Visual Basic

Show All

Forward Event

       

Occurs when the user selects the Forward action for an Outlook item.

Sub object_Forward(ByVal Forward As Object, Cancel As Boolean)

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

Forward   The new item being forwarded.

Cancel   Optional (not used in VBScript). False when the event occurs. If the event procedure sets this argument to True, the forward operation is not completed and the new item is not displayed.

Remarks

In VBScript, if you set the return value of this function to False, the forward action is not completed and the new item is not displayed.

Example

This example uses the Forward event to disable forwarding on an item by setting the return value to False and displays a message that the item may not be forwarded.

Function Item_Forward(ByVal myForwardItem)
    MsgBox "You may not forward this message!"
    Item_Forward = False
End Function