Dismiss Outlook reminder

社会主义新天地 提交于 2019-11-30 19:21:24
darbid

The only way I know how to do this is as follows.

You need this at the top of your module/class:

Private WithEvents olRemind As Outlook.Reminders

Then when you get your Outlook object you need to do this:

Set olRemind = olApp.Reminders

Where olApp is your Outlook Application object.

Now in your code you need to have this event:

Private Sub olRemind_BeforeReminderShow(Cancel As Boolean)

Once you put the WithEvents at the top then you will be able to see all the events you can use.

Now you can cancel this event and thus not see the reminder window.

sparksustc

If you want to dismiss all the reminders, you can simply implement the following code (declare this object WithEvents displaying all the events):

Private WithEvents olRemind As Outlook.Reminders

Private Sub Application_Reminder(ByVal Item As Object)
    Set olRemind = Outlook.Reminders
    ' RUN OTHER MACRO HERE
End Sub

Private Sub olRemind_BeforeReminderShow(Cancel As Boolean)
    Cancel = True          
End Sub
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!