Export (0) Print
Expand All

Reminders Property

Office 2003

Returns a Reminders collection that represents all current reminders. Read-only.

expression.Reminders

expression    Required. An expression that returns an Application object.

Example

The following example returns the Reminders collection and displays the captions of all reminders in the collection. If no current reminders are available, a message is displayed to the user.

Sub ViewReminderInfo()
'Lists reminder caption information

    Dim olApp As Outlook.Application
    Dim objRem As Outlook.Reminder
    Dim objRems As Outlook.Reminders
    Dim strTitle As String
    Dim strReport As String

    Set olApp = New Outlook.Application
    Set objRems = olApp.Reminders
    strTitle = "Current Reminders:"
    strReport = ""
    'If there are reminders, display message
    If olApp.Reminders.Count <> 0 Then
        For Each objRem In objRems
                'Add information to string
                strReport = strReport & objRem.Caption & vbCr
         Next objRem
        'Display report in dialog
        MsgBox strTitle & vbCr & vbCr & strReport
    Else
        MsgBox "There are no reminders in the collection."

    End If

End Sub


Applies to | Application Object



Show:
© 2014 Microsoft