Open Event

Open Event

See Also         Example         Applies To

Occurs when an Outlook item is being opened in an Inspector. When this event occurs, the Inspector object is initialized but not yet displayed. The Open event differs from the Read event in that Read occurs whenever the user selects the item in a view that supports in-cell editing as well as when the item is being opened in an Inspector.

Syntax 1

Function Item_Open()

Syntax 2

Sub object_Open(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 open operation is not completed and the inspector is not displayed.

Remarks

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

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