I am running a VBA script that reads emails subject lines in my Outlook Inbox and copies attachments in the emails to a folder. The subject lines are stored on a worksheet. It works except when the subject line contains a ":". Below is the error message I get, the offending code, and the subject that it's breaking on.
Cannot Parse Condition. Error at ":".
For i = 1 To UBound(avTable)
strFilter = "[Subject] = " & avTable(i, 1)
For Each itm In avTodayItems.Restrict(strFilter)
For Each att In itm.Attachments
strFilename = LCase(att.Filename)
If LCase(strFilename) = LCase(avTable(i, 2)) Then
att.SaveAsFile [nmFolder] & avTable(i, 3)
strFilter = "[Subject] = File 15.08.2012: Daily"