Düzenle

Aracılığıyla paylaş


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

See also

AppointmentItem Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.