AutoSave Zip File

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Experts,
I daily receive an email with a specific word "IUN" in subject field. This
email
contains a zip attachment. I want to save this attachment automatically in a
folder in D Drive. Please tell me how can i do that. Do i need some macro
or i can use the Rules of MS Outlook.

Thanks for the support.
Regards

Telecommm
 
Am Mon, 19 Dec 2005 03:58:02 -0800 schrieb Telecommm:

There´s no rule for saving attachments. But in Outlook >= XP you can use a
rule that runs a script if a new mail arrives with the specific subject.

Sample for such a script:

Public SaveAttachments(oMail as Outlook.MailItem)
Dim oAtt as Outlook.Attachment
For each oAtt in oMail.Attachments
oAtt.SaveAsFile "d:\path\" & oAtt.FileName
Next
End Sub
 
Hi,
Thanks for your help.
Since I am a novice so having a bit problem in running this code.
Its generating error in second line. Please have a look and advice.

Sub AutoSave_RTDs_From_Mansoor()
Public SaveAttachments(oMail as Outlook.MailItem)
Dim oAtt As Outlook.Attachment
For Each oAtt In oMail.Attachments
oAtt.SaveAsFile "d:\TestFolder" & oAtt.FileName
Next
End Sub



Thanks again.
 
Am Mon, 16 Jan 2006 23:10:02 -0800 schrieb Telecommm:

There must be only one method declaration, that is the first *or* the second
line only.

The sample expects that you call the method with a reference on the e-mail
in question. So if you decide to use the first line then please copy the
argument (i.e.: oMail as Outlook.MailItem) into the first line before
deleting the second one.
 
Back
Top