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

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

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

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

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

提前致谢!

vba triggers outlook outlook-vba
2个回答
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

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
© www.soinside.com 2019 - 2024. All rights reserved.