I have just tested it and it works fine from the test macro I posted - though you can abbreviate the line

Case Is = ".docx", ".dotx", ".pdf", ".xlsx", ".zip" 'the wanted extensions
to
Case Is = ".pdf"
if you are only interested in PDF format files.

If it is not working for you, is your rule identifying the messages with the attachments?