none
Outlook 2010 VBA Macro suddenly stops working RRS feed

  • Question

  • Hello,

    Our users have been recently upgraded to windows 7 & outlook 2010. The Excgange server environment has also been upgraded to Exchange server 2010. The macros in 'Thisoutlooksession' were working correctly following this change, but suddenly stopped working after a while

    If the outlook profile is recreated, the macros work again for a short while and then stop working. The mailbox is circa 6 GB of size and recreating the profile every time is not a preferable solution, as it takes significant time for setting up the mailbox for the first time

    Basically, we've a subroutine that fires up on for every new e-mail received in Inbox(application_newmail event). The subroutine basically reads the subject line of the inbox item that is newly received and if it maches the specified string, it takes a specific course of action

    When debugging, we found that application_new mail event is definitely fired for the new e-mail received, but the code does not enters the statements under 'If' statement where the string comparison is done

    The incoming e-mail definitely has the subject line which is specified in the code, but VBA does not locate that inbox item

    Please can some one help on this?

    Cheers

    Sunday, December 2, 2012 11:32 PM

Answers

  • Can you show your code please?  Also note that the NewMail event doesn't explicitly tell you what e-mail triggered the event.  You need to use the Items.ItemAdd event for that, but that event is not reliable when a large number of items are added to the folder at once.

    I would also verify the macro security settings on each client - it's possible that no macros can run whatsoever.


    Eric Legault MVP (Outlook)
    About me...
    Try Outlook Appins - affordable and easy to use!

    Monday, December 3, 2012 4:07 PM
    Moderator