Nelson78
Well-known Member
- Joined
- Sep 11, 2017
- Messages
- 526
- Office Version
- 2007
Hello everybody.
Speaking about Microsoft Office Outlook 2007, in ThisOutlookSession I already have a set of rules to dispatch mails and attachments.
Now, I'd like to add a rule which, for a specified sender, saves all attachments in a directory.
Could something like this be correct?
Speaking about Microsoft Office Outlook 2007, in ThisOutlookSession I already have a set of rules to dispatch mails and attachments.
Now, I'd like to add a rule which, for a specified sender, saves all attachments in a directory.
Could something like this be correct?
VBA Code:
If Msg.SenderEmailAddress = "j.smith@abc.com" Then
If Msg.Attachments.count > 0 Then
For Each Attachment In Msg.Attachments
FileName = "Z:\Desktop\Folder1\" & Msg.Attachments.FileName
Msg.Attachments.SaveAsFile FileName
Next
End If
End If