Read Event

Microsoft Outlook Visual Basic

Show All

Read Event

       

Occurs when an existing Microsoft Outlook item is opened for editing by the user. The Read event differs from the Open 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.

Sub object_Read()

object

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

Example

This VBScript example uses the Read event to increment a counter that tracks how often an item is read.

Sub Item_Read()
    Set myProperty = Item.UserProperties("ReadCount")
    myProperty.Value = myProperty.Value + 1
    Item.Save
End Sub