Open the VBA IDE in Outlook. Alt-F11 will do this.
Insert the following code to the Modules section. On the left side there is a tree, expand until you find Modules. Then, if there is not a Module item under Modules, create one by right clicking on Modules. Or right click and choose Insert -> Module.
Now, paste the text below in the main VBA window.
Close the VBA IDE.
Create a Rule that calls the script. Tools -> Rules and Alerts -> New Rule...
In the first screen of the new rule wizard, choose "Check messages when they arrive".
In the second, you could specify certain criteria that the message must match. Tip: Try "with specific words in the message header" and ".txt" for the search string to save only .txt files.
On the third screen, choose "run a script". When you click the underlined word, "script", you should see the code that you pasted in the VBA console.
Click "finish", and test your work.
Public Sub saveAttachtoDisk (itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "c:\temp\"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub