开发会议邀请排序系统 [英] Developing a Sorting System for Meeting Invitations
问题描述
我需要在收到接受/拒绝/暂定响应时运行的代码。
I need the code I have to run upon the receiving of an acceptance/decline/tentative response.
我有一个名为SetAppointmentColor()的宏,它有效很好,但必须手动调用。当我收到一封新的电子邮件时,我能够让它触发并运行,但我希望它只在我收到会议/约会的状态更新时运行。
I have a macro that exists called SetAppointmentColor() and it works just fine, but it has to be called manually. I was able to get it to trigger and run when I receive a new e-mail, but I'd like to it to run only when I receive a status update on a meeting/appointment.
我们非常感谢任何帮助,我觉得我错过了很小的东西。
Any help would be greatly appreciated, I feel I am missing something very small.
Private Sub Application_Startup()
  Call SetAppointmentColor
End Sub
私人子应用程序_新邮件()
  ;   Call SetAppointmentColor
End Sub
Private Sub Application_Startup()
Call SetAppointmentColor
End Sub
Private Sub Application_NewMail()
Call SetAppointmentColor
End Sub
这是我目前使用的两个触发器。
These are the two triggers I am currently using.
推荐答案
您好,
请处理
Items.ItemAdd事件(Outlook),检查该项的消息类并运行您的宏。
Please handle Items.ItemAdd Event (Outlook), check the message class of the item and run your macro.
Public WithEvents myOlItems As Outlook.Items
Private Sub Application_Startup()
Set myOlItems = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub myOlItems_ItemAdd(ByVal item As Object)
If item.MessageClass = "IPM.Schedule.Meeting.Resp.Pos" Then
MsgBox ("User has accepted the meeting request")
End If
End Sub
问候,
Celeste
这篇关于开发会议邀请排序系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!