Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub save_a(myItem As Outlook.MailItem)
- Dim att_count As Integer
- FolderName = "C:\Attachment\" & myItem.SenderEmailAddress & "\"
- FullFolder = FolderName & Format(myItem.ReceivedTime, "yyyymmdd") & "\"
- If Not Dir(FolderName) <> "" Then
- MkDir (FolderName)
- End If
- If Not Dir(FullFolder) <> "" Then
- MkDir (FullFolder)
- End If
- For att_count = 1 To myItem.Attachments.Count
- myItem.Attachments.Item(att_count).SaveAsFile (FullFolder & myItem.Attachments.Item(att_count).FileName)
- Next
- End Sub
Add Comment
Please, Sign In to add comment