Assuming the 'generic text' doesn't include any numbers then
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sName As String
Const sSaveFolder As String = "P:\OUTLOOKDUMP\"
For Each oAttachment In MItem.Attachments
If Right(LCase(oAttachment.fileName), 3) = "pdf" Then
sName = GetNum(oAttachment.fileName) & ".pdf"
oAttachment.SaveAsFile sSaveFolder & sName
End If
Next
End Sub
Private Function GetNum(sText As String) As String
Dim i As Integer
For i = 1 To Len(sText)
If Mid(sText, i, 1) >= "0" And Mid(sText, i, 1) <= "9" Then
GetNum = GetNum + Mid(sText, i, 1)
End If
Next
lbl_Exit:
Exit Function
End Function