IsVisible Property

Microsoft Outlook Visual Basic

expression.IsVisible

expression    Required. An expression that returns a Reminder object.

Remarks

Microsoft Outlook determines the return value of this property based on the state of the current reminder.

Example

The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example dismisses all reminders that are currently visible. For example, if the current reminder is active, the IsVisible property will return True.

Sub DismissReminders()
'Dismisses any active reminders.

    Dim olApp As Outlook.Application
    Dim objRems As Outlook.Reminders
    Dim objRem As Outlook.Reminder
    Dim i As Integer
   
    Set olApp = New Outlook.Application
    Set objRems = olApp.Reminders
   
    For i = objRems.Count To 1 Step -1
        If objRems(i).IsVisible = True Then
            objRems(i).Dismiss
        End If
    Next
    Set olApp = Nothing
    Set objRems = Nothing
    Set objRem = Nothing
End Sub