Excluding Specific Words?
Gmayor,
I'm back at it. Using the rule/code we (you) created on a different thread for a different issue, but listed below, what would I add/modify to EXCLUDE any .pdf with "Packing Slip" anywhere in the name?
[vba]
Public Sub SaveAttachmentsToDisk(Item As Outlook.MailItem)
Dim Atmt As Attachment
Dim FileName As String
Dim myExt As String
For Each Atmt In Item.Attachments
myExt = Mid(Atmt.FileName, InStrRev(Atmt.FileName, Chr(46)))
Select Case myExt
Case ".pdf"
FileName = "...\AP Invoices for Processing" & _
Format(Item.CreationTime, "yyyymmdd_hhmmss_") & Atmt.FileName
Atmt.SaveAsFile FileName
Case Else
End Select
Next Atmt
End Sub
[/vba]