Why would you re-invent the wheel. Outlook already has Save Attachments option in the File Menu which will do the same thing.