none
Hotmail connector does not trigger Application_ItemAdd event as regular IMAP send does RRS feed

  • Question

  • I have a scenario with Outlook 2007 configured for 2 IMAP accounts and 1 Hotmail connector account.   Both of the IMAP accounts trigger both routines when mail is sent from the respective accounts but the Hotmail connector mail send will only trigger Application_ItemSend

    How can I capture WithEvents for the Hotmail connector Application_ItemAdd event?

    Dim 'some and some more

    Public WithEvents myOlItems As Outlook.Items

    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

         'some pre-send code here; fires on IMAP AND on Hotmail connector pre-send

    End Sub

    Private Sub myOlItems_ItemAdd(ByVal Item As Object)

        'some post-send code here; fires on IMAP but NOT on Hotmail connector send

    End Sub

    Monday, February 20, 2012 11:25 PM

Answers

  • There is no Application.ItemAdd event.

    So which one does nto work? Items.ItemAdd? Or Application.ItemSend?

    How do you set up event handler? How do you set the myOlItems variable?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!

    Wednesday, February 22, 2012 8:14 PM

All replies

  • Hi CalCowing,

    Thanks for posting in the MSDN Forum.

    Would you please tell me your whether your project is a VBA project or VB.NET project?

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, February 22, 2012 7:50 AM
    Moderator
  • There is no Application.ItemAdd event.

    So which one does nto work? Items.ItemAdd? Or Application.ItemSend?

    How do you set up event handler? How do you set the myOlItems variable?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!

    Wednesday, February 22, 2012 8:14 PM