I need help in how to put this in a restrict syntax. the original restrict works:
Set myTasks = Fldr.Items.Restrict("[ReceivedTime]>'" & Format(Date - daysAgo, "DDDDD HH:NN") & "'")
Now i was told that it's possible to put 2 filter in a restrict so i tried:
Set myTasks = Fldr.Items.Restrict("[ReceivedTime]>'" & Format(Date - daysAgo, "DDDDD HH:NN") & "' And Not [Subject] like '%Undeliverable%'")
I tried the code above but i'm getting an error "Condition is not Valid". Basically, condition 1 filters emails based on the date it was received which does work alone. The 2nd condition that i need is to make sure that the loop will ignore emails that has "Undeliverable" in the subject line. Please help on how to put the correct syntax.