none
How to Debug the Script for a Rule RRS feed

  • Question

  • Hi,

     

    I follow the instructions in https://support.microsoft.com/en-us/help/306108/how-to-create-a-script-for-the-rules-wizard-in-outlook to setup a rule which will run a script to process the incoming emails. However, after some time, I find the rule does not work any more. After going to “Manage Rules & Alerts”, I find my rule is disabled because there is an “(Error)” mark for it.

     

    So I need to figure out the detailed reason of the error:

     

    1. How to know the accurate error that cause my rule being disabled? I cannot find error description anywhere.
    2. How to create a breakpoint in my VBA script that will be activated ONLY when an error occurs?

     

    Thanks

    • Moved by Steve Fan Tuesday, February 28, 2017 3:02 AM
    Tuesday, February 28, 2017 12:18 AM

All replies

  • Hi,

    Welcome to the Microsoft Office for IT Professionals Outlook forum.

    Since this forum is for general questions and feedback related to Microsoft Outlook, and your question is more related to script, I'll move it to a more appropriate forum:

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Steve Fan


    Please remember to mark the replies as answers if they helped.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, February 28, 2017 3:00 AM
  • Hi chcw,

    >> 1.How to know the accurate error that cause my rule being disabled?

    I am afraid there is no way to get the error message except when the error popups by running rule.

    >> 2.How to create a breakpoint in my VBA script that will be activated ONLY when an error occurs?

    There is no such breakpoint which only be hit under an error occurs.

    Could you share us your vba code for rule? If you enable the Rule, will you get any error? I would suggest you resend the email to check which email cause this error and put breakpoint to debug the code.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 28, 2017 6:16 AM