Bạn hiện đang ngoại tuyến, hãy chờ internet để kết nối lại

Outlook Object Model: Setting Cancel parameter of TaskRequestItem event doesn't keep Inspector open

You have an Outlook add-in (COM, VSTO, or VBA) that's listening for the ItemSend event, as demonstrated in the following code sample:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)    If vbCancel = MsgBox(TypeName(Item), vbOKCancel) Then        Cancel = True    End IfEnd Sub

When a TaskRequestItem event comes into the event handler, and you try to cancel the event by setting the parameter to True, the event is not canceled as expected. The Inspector window closes, and the task is displayed as assigned, but the task request is not sent.
This is a known issue in Outlook.
How you work around this issue will depend on how you are using the cancel behavior in your application. If you plan to throw a dialog box to the user before the task is sent in order to give them the option to cancel the send, you will probably have to move that functionality outside the event. 
Thuộc tính

ID Bài viết: 3179549 - Xem lại Lần cuối: 08/25/2016 17:55:00 - Bản sửa đổi: 1.0

Outlook 2016, Microsoft Outlook 2013, Microsoft Outlook 2010

  • KB3179549
Phản hồi