Muokkaa

Jaa


Reminders object (Outlook)

Contains a collection of all the Reminder objects in a Microsoft Outlook application that represent the reminders for all pending items.

Remarks

Use the Application object's Reminders property to return the Reminders collection. Use Reminders (index), where index is the name or ordinal value of the reminder, to return a single Reminder object.

Reminders are created programmatically when a new Outlook item is created with a reminder. For example, a reminder is created when an AppointmentItem object is created and the AppointmentItem object's ReminderSet property is set to True.

Example

The following example displays the captions of each reminder in the list.

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

The following example creates a new appointment item and sets the ReminderSet property to True, adding a new Reminder object to the Reminders collection.

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

Events

Name
BeforeReminderShow
ReminderAdd
ReminderChange
ReminderFire
ReminderRemove
Snooze

Methods

Name
Item
Remove

Properties

Name
Application
Class
Count
Parent
Session

See also

Outlook Object Model Reference

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.