Log in

View Full Version : save an outlook attachment from an email with the subject "x" to hard drive



jadahlke
07-19-2016, 10:33 AM
Good morning,
I've been trying this for a while and cannot get any code to work correctly. I am trying to find a code that will automatically save an outlook attachment from an email with the subject "x" to hard drive folder "y" . The code should do it automatically whenever a message is received.

Thank you so much if you can help!!

Jared

mancubus
07-20-2016, 02:20 AM
welcome to the forum.

you need an Outlook solution but this forum is about excel questions. so open your thread in Outlook Help ot ask a forum moderator to move this thread to Outlook Help.

that said, have a look at these:
http://www.pixelchef.net/content/rule-autosave-attachment-outlook
http://superuser.com/questions/884079/automatically-save-outlook-attachment

snb
07-20-2016, 03:01 AM
Sub M_snb()
For Each it In CreateObject("Outlook.application").GetNamespace("MAPI").GetDefaultFolder(6).Items
For Each at In it.Attachments
at.SaveAsFile "E:\" & at.FileName
Next
Next
End Sub