i have this line of code on a script I found at . The original scripts saves the attachment. I removed those lines as I want to delete attachments in Outlook but preserve the email without saving the attachment to a directory. It's working fine however its deleting all attachments and ignoring the date specified. I am telling it to delete only attachments older than a month. Why is it ignoring the date?
But shouldn't this line of code below take care of it?
How would I go about filtering on the attachment itself? I want to tell it, any emails older than X, that contain attachments, delete the attachment but preserve the email.