Sub Save_Particular_attatchment()
'Step 1: Declare your variables
Dim ns As Namespace
Dim MyInbox As MAPIFolder
Dim MItem As Object
Dim Atmt As Attachment
Dim FileName As String
Dim i As Integer
'Step 2: Set a reference to your inbox
Set ns = GetNamespace("MAPI")
Set MyInbox = ns.GetDefaultFolder(olFolderInbox)
'Step 3: Check for messages in your inbox; exit if none
If MyInbox.Items.Count = 0 Then
MsgBox "No messages in folder."
Exit Sub
End If
'Step 4: Create directory to hold attachments
On Error Resume Next
MkDir "C:\Monty\"
'Step 5: Start to loop through each mail item
For Each MItem In MyInbox.Items
'Step 6: Check for the words Data Submission in Subject line
If InStr(1, MItem.Subject, "Monty") < 1 Then 'Change "Monty" to your subject which you are looking for
GoTo SkipIt
End If
'Step 7: Save each with a log number; go to the next attachment
i = 0
For Each Atmt In MItem.Attachments
FileName = _
"C:\Monty\Attachment-" & i & "-" & Atmt.FileName
Atmt.SaveAsFile FileName
i = i + 1
Next Atmt
'Step 8: Move to the next mail item
SkipIt:
Next MItem
'Step 9: Memory cleanup
Set ns = Nothing
Set MyInbox = Nothing
End Sub