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

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

我喜欢在会议取消后仍进行跟踪。这有助于我回顾针对各种主题所进行的活动,有时还能解释我为什么没有参加你的会议。(例如,“当时有一个定期会议,但主席后来取消了它,并删除了整个系列会议,而不仅仅是未来的会议。”)

我尝试使用发布在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

你应该制定一条规则来配合它,我认为这部分很好:

截屏

答案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

相关内容