在提醒显示之前立即发生。
Sub object_Reminder(ByVal Item As Object)
object 该表达式的值为 Application 对象。
Item 与提醒相关的 AppointmentItem、MailItem、ContactItem 或 TaskItem。如果与提醒相关的约会为定期约会,则 Item 为显示提醒的约会的特定事件,而不是主约会。
本 Microsoft Visual Basic/Visual Basic for Applications 示例测试生成提醒的项目,以确定它是否为邮件项目。如果是邮件项目,示例将使用 ReplyAll 方法创建并显示新邮件项目。示例代码必须放在类模块中,并且在 Microsoft Outlook 调用该事件过程前必须调用 Initialize_handler
例程。
Dim WithEvents myolapp As Outlook.Application
Sub Initialize_handler()
Set myolapp = CreateObject("Outlook.application")
End Sub
Private Sub myolapp_Reminder(ByVal Item As Object)
Dim myReplyItem As Outlook.MailItem
If TypeName(Item) = "MailItem" Then
Set myReplyItem = Item.ReplyAll
myReplyItem.Display
End If
End Sub