“new mail arived” Desktop Alert doesn’t work for filtered mail in Outlook 2007

Since converting from Outlook 2003 to Outlook 2007, I’ve noticed I never got the new mail arrived popup nor the task bar envelope icon.  I noticed that periodically throughout the day, I’d have to open Outlook, notice that the urgent email I didn’t know I had came in 3 hours ago, and then run around in a panic for the rest of the afternoon doing damage control.  Or I’d open Outlook incesently every few minutes to note that I had nothing new.  Both were annoying scenarios.

Every search on the topic pointed me to the standard location for such things:

Tools menu > Options > Preferences > E-Mail Options > Advanced Email Options and insure the “Display new Desktop Alert” choice was checked.  Of course it was.

Well, here’s the caveat to that feature: “default inbox only” — in parenthesis on the checkbox.  E.g. if I have any rules and filters that sort my mail, it doesn’t work.  In Outlook 2003, it would still pull up the alerts.  Ugh!

Well, like any compulsive geek, I have multiple email accounts, one for each role in my life: Dad, Programmer, Spam target, etc.  I have rules in Outlook that sorts my In Box into distinct sub-folders based on the hat I need to wear to process it.  That way my personal email inbox can furlough during business hours, and I can ignore business email in off hours.  It works great, but also means the Desktop Alerts don’t work.

The solutions came from here:

1. Display in the New Item Alert window: in Tools > Rules & Alerts window, choose Change Rule > Display in New Item Alert window.  This gets new mail into the popup that tells me about calendar items.

or even better

2. Display the Desktop Alert: in Tools > Rules & Alerts window, choose Change Rule > Edit Rule Settings.  In the second screen, “What do you want to do with this message”, at the bottom, check on “display Desktop Alert”.

OK, I’m annoyed that both methods are per-rule, so to enable this, I had to run around each rule a bit, but now the pop-ups are back, and I’m no longer the digital MIA I once was.

Next up, I need to find an analog excuse mechanism for why I haven’t returned your email…  :D

Rob

RegEx match content unless it is inside quotes

I recently had the need to match content outside quotes, but avoid content inside quotes.  For example, I have content like so:

this is content to replace, “but don’t replace this string, it’s “important”", but feel free to replace this.

The answer came from http://thisworkinglife.blogspot.com/2006/04/net-regular-expressions-finding.html supported by http://regexadvice.com/forums/thread/36369.aspx and http://www.regular-expressions.info/lookaround.html and http://aspnet.4guysfromrolla.com/articles/022603-1.aspx

The expression is added to the beginning of any other expression.  Here it is:

(?<=^(([^"]*(?<!\\)”[^"]*(?<!\\)”[^"]*)*|[^"]*))

It means: “… and before it is an even number of double-quotes not preceeded by a or no quotes at all before it …”

If you’ve never used look-ahead or look-behind expressions, they’re incredibly cool.  I understand they’re not as performant as normal expressions, but definitely do the job.  The nice part about them is they’re not considered part of the match in any way, so no need to capture this non-important content and replace it back into the modified string.

In time, I’d like to expand it to encompass single-quoted text too, but that got weird.  Do I need to escape a ‘ inside a ‘ but not a “?  If there’s a ‘ inside a ” is it ok?  What if it’s a ‘ that doesn’t have white space around it such as “can’t” or “don’t”?  Do I escape a ‘ with a or with a ‘?  For this purpose, assuming the content in question was in double-quotes was sufficient, and made the regex much simpler.

Rob