Write Event

See Also         Example         Applies To

Occurs when an Outlook item is saved, either explicitly (for example, using the Save or SaveAs methods) or implicitly (for example, in response to a prompt when closing the item's inspector).

Syntax 1

Function Item_Write()

Syntax 2

Sub object_Write(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 save operation is not completed.

Remarks

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

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