CustomPropertyChange Event
Applies To
AppointmentItem object, ContactItem object, JournalItem object, MailItem object, MeetingRequestItem object, NoteItem object, PostItem object, RemoteItem object, ReportItem object, TaskItem object, TaskRequestItem object.
Description
Occurs when a custom property of an Outlook item is changed. The property name is passed to the procedure so that you can determine which custom property changed.
Syntax
Sub Item_CustomPropertyChange(Name As String)
Name The name of the custom property that was changed.
See Also
Close event, CustomAction event, Forward event, Open event, PropertyChange event, Read event, Reply event, ReplyAll event, Send event, Write event.
Example
This example enables a control when a Boolean field is set to True.
Sub Item_CustomPropertyChange(ByVal myPropName)
Select Case myPropName
Case "RespondBy"
Set myPropChg = myItem.GetInspector.ModifiedFormPages
Set myCtrl = myPropChg("Page 2").Controls("DateToRespond")
If myItem.UserProperties("RespondBy").Value Then
myCtrl.Enabled = True
myCtrl.Backcolor = 1
Else
myCtrl.Enabled = False
myCtrl.Backcolor = 0
End If
Case Else
End Select
End Sub