将取消的会议保留在您的日历上以供参考


1

我喜欢在取消会议后跟踪会议。它可以帮助我回顾各种主题的活动,有时还可以解释为什么我没有去参加你的会议。(EG,“同时召开了一次定期会议,但主席已经取消了会议并删除了整个系列,而不仅仅是未来的系列。”)

我尝试使用slipstick.com上发布的脚本,因为一些不同的搜索结果让我回到同一篇文章。但是,它对我来说不太适合。有没有更简单的方法?

这是该脚本的副本:

Sub CopyMeetingtoAppointment(oRequest As MeetingItem)

If oRequest.MessageClass <> "IPM.Schedule.Meeting.Canceled" Then
  Exit Sub
End If

Dim oAppt As AppointmentItem
Dim cAppt As AppointmentItem

Set cAppt = oRequest.GetAssociatedAppointment(True)
Set oAppt = Application.CreateItem(olAppointmentItem)

'I added (Rule) to the subject so I could see the rule was working. 
    oAppt.Subject = "(Rule) Canceled: " & cAppt.Subject
    oAppt.Start = cAppt.Start
    oAppt.Duration = cAppt.Duration
    oAppt.Location = cAppt.Location
    oAppt.Display
    oAppt.Save

    Set oAppt = Nothing
    Set cAppt = Nothing
End Sub

你应该设置一个规则来配合它,我认为那部分是好的:

截图

Answers:


1

在摆弄它之后,我发现了一种将日历事件复制到约会项目的更简单的方法:使用实际的复制方法。我已经在各种场景中对它进行了测试,特别是在定期会议中,它表现得非常完美。我已将其设置为删除任何提醒,并在此期间将自己设置为免费。另外,我添加了关于谁取消它的说明。如果人们可以找到任何其他改进,我会欢迎他们。

Sub CopyMeetingToAppointment(oRequest As MeetingItem)

    'Double-check in case of accidental run
    If oRequest.MessageClass <> "IPM.Schedule.Meeting.Canceled" Then Exit Sub

    'Declare the objects
    Dim oAppt As AppointmentItem
    Dim cAppt As AppointmentItem
    Dim cancelMessage As String

    'Create the objects
    Set cAppt = oRequest.GetAssociatedAppointment(True)
    Set oAppt = cAppt.Copy

    'Create the cancel message
    cancelMessage = vbNewLine & vbNewLine & " - - - - - - - - - - - - - - - - - - - " & vbNewLine & _
        "Meeting was canceled by " & oRequest.SenderName & " <" & oRequest.SenderEmailAddress & "> on " & oRequest.ReceivedTime

    'Modify the copied appointment
    With oAppt
        If UCase(Left(.Subject, 6)) = "COPY: " Then .Subject = Mid(.Subject, 7)
        .Subject = "[BKP] " & .Subject
        .Body = .Body & cancelMessage
        .ReminderSet = False
        .BusyStatus = olFree
        .Save
    End With

    'Cleanup
    Set oAppt = Nothing
    Set cAppt = Nothing

End Sub

取消或删除会议时是否会触发此消息?还是需要调用?
Raystafarian 2016年

啊,好点。我设置了一个规则,如OP中的链接所指定的那样。我会补充一点。
工程师敬酒2016年

哦,我错过了那一部分。非常酷。不需要错误处理?
Raystafarian 2016年

1
@Raystafarian我对错误处理非常懒惰......我可以投入一些基本的东西On Error GoTo errHandler,让它弹出一条消息。但是,我有点喜欢向我抛出错误,因为那时我会去解决导致它的问题。
工程师敬酒2016年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.