S
StargateFan
The macro is this one that was so kindly given before:
"Sub SaveAttachment()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment
Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")
For Each objAttachment In colAttachments
objAttachment.SaveAsFile
("C:\WINDOWS\Desktop\YAHOOgroups\!Attachments saved from Outlook\" &
objAttachment.FileName)
Next
Set objAttachment = Nothing
Set colAttachments = Nothing
Set objCurrentItem = Nothing
End Sub"
The only problem is that I sometimes delete the folder without meaning
to. I've done that a couple of times. A few months back I then went
to save a bunch of embedded graphics only to come back a few days
later to find they weren't there (. And, of course, the emails were
gone. Any way to add a bit of code above to create the folder if the
folder doesn't already exist?
Thanks so much!
"Sub SaveAttachment()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment
Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")
For Each objAttachment In colAttachments
objAttachment.SaveAsFile
("C:\WINDOWS\Desktop\YAHOOgroups\!Attachments saved from Outlook\" &
objAttachment.FileName)
Next
Set objAttachment = Nothing
Set colAttachments = Nothing
Set objCurrentItem = Nothing
End Sub"
The only problem is that I sometimes delete the folder without meaning
to. I've done that a couple of times. A few months back I then went
to save a bunch of embedded graphics only to come back a few days
later to find they weren't there (. And, of course, the emails were
gone. Any way to add a bit of code above to create the folder if the
folder doesn't already exist?
Thanks so much!