I'm trying to do this:
Public Sub saveAttachment(item As Outlook.MailItem)
Dim attachment As Outlook.Attachment
Dim defaultPath As String
defaultPath = "c:\Email Exports"
For Each attachment In itm.Attachments
attachment.SaveAsFile defaultPath & "\" & attachment.DisplayName
Set attachment = Nothing
Next
End Sub
...while also creating subfolders per email it extracts from.
Example. John Doe - Important files has two attachments.
Create a John Doe - Important files folder, and save the two attachments.
The default behavior is to save them as individual files but I would like them to be organized per email. I stumbled on ways to do the creation part, but it creates a folder per attachment and not per email.