从 Outlook VBA 中的整个约会系列中删除提醒

问题描述 投票:0回答:1

我有一个简单的宏可以从选定的日历约会中删除任何提醒:

Public Sub RemoveReminder()
  If Application.ActiveExplorer.Selection.Class = 74 Then
     Application.ActiveExplorer.Selection.Item(1).ReminderSet = False
  Else
    MsgBox "not an appointment"
  End If
End Sub

当约会是单次发生时,此方法效果很好,但对于定期约会,它仅更改一个选定的实例,而不是整个定期系列。如何修改此代码以从这些类型的约会的整个定期系列中删除 ReminderSet?

vba outlook calendar reminders recurrent
1个回答
0
投票

AppointmentItem.Parent
属性返回重复实例和异常(主)的父级
AppointmentItem
。在主约会上设置属性应该会影响系列/事件。

您可以使用 AppointmentItem.RecurrenceState 属性检查您是否处理事件或主约会,该属性返回一个 OlRecurrenceState 常量,指示指定对象的重复属性。

© www.soinside.com 2019 - 2024. All rights reserved.