Hi, I'm trying to create a script to read attachment names in a folder of emails and only save the attachments with specific words in the name. I would like to attach this to a rule so can manually run this through whichever folder I set. Right now I've been using this code, however it saves ALL attachments:

Public Sub AIG(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\Test"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub

Thank you in advance!