AppointmentItem.PropertyChange Event (Outlook)
Occurs when an explicit built-in property (for example, Subject) of an instance of the parent object is changed.
Syntax
expression .PropertyChange(Name)
expression A variable that represents an AppointmentItem object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Name |
Required |
String |
The name of the property that was changed. |
Remarks
The property name is passed to the event so that you can determine which property was changed.
Example
This Visual Basic for Applications (VBA) example uses the PropertyChange event to prevent someone from disabling a reminder on an item.
Public WithEvents myItem As Outlook.AppointmentItem
Sub Initialize_handler()
Set myItem = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items("Status Meeting")
End Sub
Private Sub myItem_PropertyChange(ByVal Name As String)
Select Case Name
Case "ReminderSet"
MsgBox "You may not remove a reminder on this item."
myItem.ReminderSet = True
Case Else
End Select
End Sub