重新安排时自动更新Outlook会议提醒

时间:2014-07-22 19:38:15

标签: vba triggers outlook outlook-vba

我试图找到一种方法(规则或VBA我不可知),以便在重新安排会议时自动更改提醒值。

我已经四处寻找,却无法找到改变会议日期时间的方法,这似乎是达到我想要的第一步,所以指导什么正确/最接近的触发器可能足以让我开始(我应该能够在触发后实际检查并重置提醒)。

背景:最终目标是让脚本/规则确保在重新安排会议时,其提醒不是"无" (如果在提醒被解雇后重新安排会议是最好的例子)。在最幸福的世界中,脚本对于谁拥有会议是不可知的(这就是为什么最好关闭会议时间的变化)。

提前致谢!

2 个答案:

答案 0 :(得分:1)

我知道这个问题已经过时了,但我在搜索答案时偶然发现了谷歌。如果会议提醒设置为少于10分钟(Outlook 2013),则结束创建一些VBA以通知自己:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Application_ItemSend fires everytime you hit send on any mail, meeting, etc.
Dim m As Variant
'check to see if the item you're about to send is a meeting invite:
If TypeName(Item) = "MeetingItem" Then
    'if the reminder is not set at all, or set to less than 10 minutes, give the user the option to cancel sending
    If (Not Item.GetAssociatedAppointment(False).ReminderSet) Or (Item.GetAssociatedAppointment(False).ReminderMinutesBeforeStart < 10) Then
        m = MsgBox("Your meeting reminder is set to 10 minutes or less. Do you still want to send?", vbExclamation + vbYesNo + vbMsgBoxSetForeground)
            If m = vbNo Then Cancel = True
            End If
    End If
handleError:
If Err.Number <> 0 Then
MsgBox "Outlook Error: " & Err.Description, vbExclamation
End If
End Sub

答案 1 :(得分:0)

请参阅ItemChange事件http://msdn.microsoft.com/en-us/library/office/ff865866%28v=office.14%29.aspx

Public WithEvents myOlItems As Outlook.Items 

Public Sub Application_Startup() 
  Set myOlItems = _
    Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items 
End Sub 

Private Sub myOlItems_ItemChange(ByVal Item As Object) 
    debug.print item.subject
End Sub