My goal is no make Outlook delete all mail from a specified address keeping maximum 3 latest (it really helps with some daily subscriptions like coupons, etc.).
I have lots of rules sorting mail into different folders and marking them with a special category (let's call it "Amount: 3"). I also have the last rule in the list that runs my VBA script: it counts mail from the same sender in a folder (having this "Amount: 3" category) and deletes old leaving no more than the amount requested.
The whole thing works fine when Outlook is running and receives new mail. But when I start Outlook for the first time and there's new mail on the server - it randomly tells that the script rule failed to execute and turns it off...
My script does logging so I'm quite sure it's not an incorrect script issue. Moreover it seems like when I turn on debug logging in Outlook - the problem disappears. And there's nothing suspicious in the system journal too...
So the question is how can I find out what's wrong with it?? If negative - is there a way to acheive what I want in Outlook 2013?
And yes I know that MS suggests not using VBA rule together with other kinds of rules no matter the order and so on, but still can't believe they've made it so unpredictable...
ps: the same solution worked more or less stable at Outlook 2007 back in the days...