Outlook) (Reminders 物件
包含 Microsoft Outlook 應用程式中所有 Reminder 物件的集合,這些物件代表所有暫止專案的提醒。
註解
使用 Application 物件的 Reminders 屬性可傳回 Reminders 集合。 使用 Reminders (索 引) ,其中 index 是提醒的名稱或序數值,可傳回單一 Reminder 物件。
使用提醒建立新的 Outlook 專案時,會以程式設計方式建立提醒。 例如,當 AppointmentItem 物件建立且 AppointmentItem 物件的 ReminderSet 屬性設定為 True時,就會建立提醒。
範例
下列範例會顯示清單中每個提醒的標號。
Sub ViewReminderInfo()
'Lists reminder caption information
Dim objRem As Reminder
Dim objRems As Reminders
Dim strTitle As String
Dim strReport As String
Set objRems = Application.Reminders
strTitle = "Current Reminders:"
'If there are reminders, display message
If Application.Reminders.Count <> 0 Then
For Each objRem In objRems
'If string is empty, create new string
If strReport = "" Then
strReport = objRem.Caption & vbCr
Else
'Add info to string
strReport = strReport & objRem.Caption & vbCr
End If
Next objRem
'Display report in dialog
MsgBox strTitle & vbCr & vbCr & strReport
Else
MsgBox "There are no reminders in the collection."
End If
End Sub
下列範例會建立新的約會項目,並將 ReminderSet 屬性設定為 True,在 Reminders 集合中加入新的 Reminder 物件。
Sub AddAppt()
'Adds a new appointment and reminder to the reminders collection
Dim objApt As AppointmentItem
Set objApt = Application.CreateItem(olAppointmentItem)
objApt.ReminderSet = True
objApt.Subject = "Tuesday's meeting"
objApt.Save
End Sub
事件
名稱 |
---|
BeforeReminderShow |
ReminderAdd |
ReminderChange |
ReminderFire |
ReminderRemove |
Snooze |
方法
名稱 |
---|
項目 |
Remove |
屬性
名稱 |
---|
Application |
Class |
Count |
Parent |
Session |
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。