返回指定的提醒下一次发生的时间。Date 类型,只读。
expression.NextReminderDate
expression 必选。该表达式返回 Reminder 对象。
NextReminderDate 属性的值会在每次执行该对象的 Snooze 方法或用户单击“暂停”按钮时更改。
以下示例创建集合中所有提醒的报告和它们下一次发生的时间。子例程将 Caption 和 NextReminderDate 属性连接为一个字符串,并在对话框中显示该字符串。
Sub DisplayNextDateReport()
'Displays the next time all reminders will be displayed
Dim olApp As Outlook.Application
Dim objRems As Reminders
Dim objRem As Reminder
Dim strTitle As String
Dim strReport As String
Set olApp = Outlook.Application
Set objRems = olApp.Reminders
strTitle = "Current Reminder Schedule:"
'Check if any reminders exist
If objRems.Count = 0 Then
MsgBox "There are no current reminders."
Else
For Each objRem In objRems
'If string is empty, create new string
If strReport = "" Then
strReport = objRem.Caption & vbTab & _
objRem.NextReminderDate & vbCr
Else
'Add info to string
strReport = strReport & objRem.Caption & vbTab & _
objRem.NextReminderDate & vbCr
End If
Next objRem
'Display report in dialog
MsgBox strTitle & vbCr & vbCr & strReport
End If
End Sub