使用VBA,我想简化Outlook中用于拒绝会议但将其保留在日历中的当前流程。当前过程是:
我发现的任何VBA示例都在使用VBA创建会议副本。这打破了与原始会议的联系,这意味着该会议不会被更新,以后我将无法接受。我想按照上面列出的确切步骤进行操作以保持链接。
下面有简化的代码,但是有两个主要问题:
代码:
Public Sub DeclineButKeep()
Dim oAppt As Outlook.AppointmentItem
Dim oResponse As Outlook.MeetingItem
Dim oRequest As Outlook.MeetingItem
Set oRequest = GetCurrentItem
Set oAppt = oRequest.GetAssociatedAppointment(True)
Set oResponse = oAppt.Respond(olMeetingDeclined, False, True)
oResponse.Send
Set oAppt = oRequest.GetAssociatedAppointment(True)
Set oResponse = oAppt.Respond(olMeetingTentative, True)
oRequest.Delete
Set oAppt = Nothing
Set oResponse = Nothing
Set oRequest = Nothing
End Sub